The WesternTech » Flows » Flow – Create Rollup summary to calculate the Contacts associated with Accounts
Scenario : This is sample Usecase
Step 1: Create an Apex class named
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.
Step 2: Create an Apex class named
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.
Step 3: Add Your Heading Text Here
global class accountBatchFailuresSync implements Database.Batchable, Database.AllowsCallouts {
public String query = 'Select Id, Name, Industry, Number_of_opps__c, LastModifiedDate, CreatedDate, LastModifiedBy.Id from Account where Industry != null AND Do_Not_Sync__c = false AND ((Number_of_opps__c > 0 OR Admin_Id__c != null) AND Synced__c = false)';
global Database.QueryLocator start(Database.BatchableContext BC) {
return Database.getQueryLocator(query);
}
global void execute(Database.BatchableContext BC, List records) {
Set acts = new Set();
for (Account act: records) {
acts.add(string.ValueOf(act.Id));
}
if(accountSyncAPIrecursion.isFirstTime) {
accountSyncAPI.startBatchFailureSync(acts);
}
}
global void finish(Database.BatchableContext BC){
}
}
Video
References
All Categories
Recent Posts
Elementor #6437Lightning Out to integrate the Salesforce real time data into external websiteCreating a Lookup Field in Screen FlowDisplay Static Resource into Salesforce FlowConnect Salesforce with Postman Application and Test REST APIDownload and upload Salesforce Metadata using Visual Studio CodeFlow - Create Rollup summary to calculate the Contacts associated with AccountsUpload a file as an attachment to a record using Visualforce PageCreate a Lighting Web Component using Visual Studio CodeHide or Display Text using Picklist Selection by Conditional Logic in Salesforce Flow