daily pastebin goal
24%
SHARE
TWEET

Untitled

a guest Mar 19th, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. global class UpdateEventScore implements Database.Batchable<sObject> {
  2.  
  3.     global Database.QueryLocator start(Database.BatchableContext bc) {
  4.         // collect the batches of records or objects to be passed to execute
  5.         return Database.getQueryLocator(
  6.              'Select Contact.Account.ID' +
  7.              'from CampaignMember' +
  8.              'WHERE Campaign.StartDate = LAST_N_DAYS:365' +
  9.              'AND status = 'Attended' ORDER BY Campaign.StartDate'
  10.         )
  11.     }
  12.     global void execute(Database.BatchableContext bc, List<P> records){
  13.         // process each batch of records
  14.     }    
  15.     global void finish(Database.BatchableContext bc){
  16.         // execute any post-processing operations
  17.     }    
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top