Guest User

Untitled

a guest
Dec 13th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. public class ContactDeletesa implements database.Batchable<sobject>{
  2. public database.QueryLocator start(database.BatchableContext BC){
  3.  
  4. String Query='select id,lastmodifieddate from contact where level__C='First' ';
  5. return database.getQueryLocator(Query);
  6. }
  7. public void execute(database.BatchableContext BC,List<contact>scope){
  8. List<contact>conList=new list<contact>();
  9. for(contact co:scope){
  10. co.level__C='1';
  11. conList.add(co);
  12. }
  13. database.update(conlist,false);
  14. }
  15. public void finish(database.BatchableContext BC){
  16.  
  17. }
Add Comment
Please, Sign In to add comment