Run BatchClass To Test Only One Record From Anonymous Window Batch Class Name : updateAccountBatch Record Id for which we want to run batch class : 0010K00001k4YIo Create instance of batch class. Pass parameters to execute method in batch class. Pass null to first parameter Database.BatchableContext BC Pass soql with hardcoded record id to second parameter List<sObject> scope Solution 1: updateAccountBatch updateBatch = new updateAccountBatch(); updateBatch.excute(null,[SELECT Id,name from Account Where Id = '0010K00001k4YIo']) Solution 2: new updateAccountBatch().execute(null,[SELECT Id,name from Account Where Id = '0010K00001k4YIo']);
Posts
Showing posts from August, 2019
- Get link
- X
- Other Apps

Open Report in New Window on Record Page In Lightning We can open report in new window from record page in lightning Experience. We will pass report id 00O0K00000B0Egn from ShowReport.cmp. In NavigateToReport.cmp we will get record details of current page. We can fetch any fields on record using force:recordData. In controller, we can form url to navigate and pass paramters to filter values. We can open report in new window using, window.open(url ,'_blank','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width='+ w +'px,height='+ h +'px,top=50px,left=100px'); After this we will close modal using force:closeQuickAction. We need to create quick action to call ShowReport.cmp on record page button. Don't forget to add quick action in Mobile & Lightning Actions section in page layout . Loading Records - Make a record available for your UI components is to load it. Load the record by inclu...