Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ContactDeletesa implements database.Batchable<sobject>{
- public database.QueryLocator start(database.BatchableContext BC){
- String Query='select id,lastmodifieddate from contact where level__C='First' ';
- return database.getQueryLocator(Query);
- }
- public void execute(database.BatchableContext BC,List<contact>scope){
- List<contact>conList=new list<contact>();
- for(contact co:scope){
- co.level__C='1';
- conList.add(co);
- }
- database.update(conlist,false);
- }
- public void finish(database.BatchableContext BC){
- }
Add Comment
Please, Sign In to add comment