Skip to main content
deleted 4 characters in body
Source Link
Json
  • 1.7k
  • 7
  • 45
  • 94
import getWorkListgetData from '@salesforce/apex/getAsyncController.getData'; isLoading = true; data = []; program = null; filter = null; @wire(getData) wiredMethod({error, data}){ getData({program:this.program,filter:this.filter}) .then(data => { this.data = data this.error = null; this.isLoading = false: }) .catch(error => { this.data = null; this.error = error; }); } handleTabChange(event) { this.isLoading = true; this.activetabContent = event.target.value; this.callAsync(); } callAsync() { getData({program: this.program,filter: this.filter}) .then(data => { this.data = data this.error = null; this.isLoading = false: }) .catch(error => { this.data = null; this.error = error; }); } 
public with sharing class getAsyncController { @AuraEnabled(cacheable = true) public static List < StringProgram__c > getData(String program, String filter) { if (filter == null) return [SELECT Id FROM Program__c WHERE Name =: program]; else return [SELECT Id FROM Program__C WHERE Name =: program AND Status__c =: filter] } } 
import getWorkList from '@salesforce/apex/getAsyncController.getData'; isLoading = true; data = []; program = null; filter = null; @wire(getData) wiredMethod({error, data}){ getData({program:this.program,filter:this.filter}) .then(data => { this.data = data this.error = null; this.isLoading = false: }) .catch(error => { this.data = null; this.error = error; }); } handleTabChange(event) { this.isLoading = true; this.activetabContent = event.target.value; this.callAsync(); } callAsync() { getData({program: this.program,filter: this.filter}) .then(data => { this.data = data this.error = null; this.isLoading = false: }) .catch(error => { this.data = null; this.error = error; }); } 
public with sharing class getAsyncController { @AuraEnabled(cacheable = true) public static List < String > getData(String program, String filter) { if (filter == null) return [SELECT Id FROM Program__c WHERE Name =: program]; else return [SELECT Id FROM Program__C WHERE Name =: program AND Status__c =: filter] } } 
import getData from '@salesforce/apex/getAsyncController.getData'; isLoading = true; data = []; program = null; filter = null; @wire(getData) wiredMethod({error, data}){ getData({program:this.program,filter:this.filter}) .then(data => { this.data = data this.error = null; this.isLoading = false: }) .catch(error => { this.data = null; this.error = error; }); } handleTabChange(event) { this.isLoading = true; this.activetabContent = event.target.value; this.callAsync(); } callAsync() { getData({program: this.program,filter: this.filter}) .then(data => { this.data = data this.error = null; this.isLoading = false: }) .catch(error => { this.data = null; this.error = error; }); } 
public with sharing class getAsyncController { @AuraEnabled(cacheable = true) public static List < Program__c > getData(String program, String filter) { if (filter == null) return [SELECT Id FROM Program__c WHERE Name =: program]; else return [SELECT Id FROM Program__C WHERE Name =: program AND Status__c =: filter] } } 
added 516 characters in body
Source Link
Json
  • 1.7k
  • 7
  • 45
  • 94
import getWorkList from '@salesforce/apex/getAsyncController.getData'; isLoading = true;  data = [];  program = null;  filter = null; @wire(getData) wiredMethod({error, data}){ getData({program:this.program,filter:this.filter}) .then(data => { this.data = data this.error = null; this.isLoading = false: }) .catch(error => { this.data = null; this.error = error; }); }  handleTabChange(event) { this.isLoading = true; this.activetabContent = event.target.value; this.callAsync(); } callAsync() { getData({program: this.program,filter: this.filter}) .then(data => { this.data = data this.error = null; this.isLoading = false: }) .catch(error => { this.data = null; this.error = error; }); } 
isLoading = true; data = []; program = null; filter = null; handleTabChange(event) { this.isLoading = true; this.activetabContent = event.target.value; this.callAsync(); } callAsync() { getData({program: this.program,filter: this.filter}) .then(data => { this.data = data this.error = null; this.isLoading = false: }) .catch(error => { this.data = null; this.error = error; }); } 
import getWorkList from '@salesforce/apex/getAsyncController.getData'; isLoading = true;  data = [];  program = null;  filter = null; @wire(getData) wiredMethod({error, data}){ getData({program:this.program,filter:this.filter}) .then(data => { this.data = data this.error = null; this.isLoading = false: }) .catch(error => { this.data = null; this.error = error; }); }  handleTabChange(event) { this.isLoading = true; this.activetabContent = event.target.value; this.callAsync(); } callAsync() { getData({program: this.program,filter: this.filter}) .then(data => { this.data = data this.error = null; this.isLoading = false: }) .catch(error => { this.data = null; this.error = error; }); } 
Added more code, controller and js
Source Link
Json
  • 1.7k
  • 7
  • 45
  • 94
isLoading = true; data = []; program = null;  filter = null; handleTabChange(event) {   this.isLoading = true;   this.activetabContent  = event.target.value;   this.callAsync(); } @wire(getAsyncController) callAsync() { getData({program: this.program,filter: this.filter})   .then(data => {   this.data = data   this.error = null;   this.isLoading = false:   })   .catch(error => {   this.data = null;   this.error = error;  }); this.error = error;  }); } 
public with sharing class getAsyncController { @AuraEnabled(cacheable = true) public static List < String > getData(String program, String filter) { if (filter == null)   return [SELECT Id FROM Program__c WHERE Name =: program]; else return [SELECT Id FROM Program__C WHERE Name =: program AND Status__c =: filter] } } 
isLoading = true; data = []; program = null;   handleTabChange(event) {   this.isLoading = true;   this.activetabContent  = event.target.value;   this.callAsync(); } @wire(getAsyncController) callAsync(){ getData({program:this.program}) .then(data => { this.data = data this.error = null; this.isLoading = false: }) .catch(error => { this.data = null;   this.error = error;  }); } 
public with sharing class getAsyncController { @AuraEnabled(cacheable = true) public static List < String > getData(String program) { return [SELECT Id FROM Program__c WHERE Name =: program]; } } 
isLoading = true; data = []; program = null; filter = null; handleTabChange(event) { this.isLoading = true; this.activetabContent = event.target.value; this.callAsync(); } callAsync() { getData({program: this.program,filter: this.filter})   .then(data => {   this.data = data   this.error = null;   this.isLoading = false:   })   .catch(error => {   this.data = null; this.error = error;  }); } 
public with sharing class getAsyncController { @AuraEnabled(cacheable = true) public static List < String > getData(String program, String filter) { if (filter == null)   return [SELECT Id FROM Program__c WHERE Name =: program]; else return [SELECT Id FROM Program__C WHERE Name =: program AND Status__c =: filter] } } 
Added more code, controller and js
Source Link
Json
  • 1.7k
  • 7
  • 45
  • 94
Loading
deleted 267 characters in body
Source Link
Json
  • 1.7k
  • 7
  • 45
  • 94
Loading
added 386 characters in body
Source Link
Json
  • 1.7k
  • 7
  • 45
  • 94
Loading
Source Link
Json
  • 1.7k
  • 7
  • 45
  • 94
Loading