Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement