Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. global string query;
  2. global string Email;
  3. global string Contact;
  4.  
  5. public Batch_Class (String b, String q, String a){
  6.  
  7. Email = b;
  8. query = q;
  9. Contact = a;
  10.  
  11. }
  12. global database.querylocator start(Database.BatchableContext BC){
  13. query = 'Select id,b from a where b != null';
  14. return Database.getQueryLocator(query);
  15. }
  16. global void execute(Database.BatchableContext BC, List<a> scope){
  17. List<a> cons = new List<a>();
  18. for (a s : scope){
  19. s.b= s.b +'.test';
  20. System.debug(s);
  21. cons.add(s);
  22. }
  23. update cons;
  24. }
  25. global void finish(Database.BatchableContext BC){
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement