function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
global class RemoveBillingInfo implements Database.Batchable<sObject>{ global Database.QueryLocator start(Database.BatchableContext BC){ String query = 'SELECT Name, BillingStreet, BillingCity, BillingState, BillingPostalCode,BillingCountry, BillingLatitude, BillingLongitude FROM Account' ; return Database.getQueryLocator(query); } global void execute(Database.BatchableContext BC, List<Account> AccountList){ for(Account act : AccountList){ act.BillingStreet = ''; act.BillingCity = ''; act.BillingState = ''; act.BillingPostalCode = ''; act.BillingCountry = ''; act.BillingLatitude = ''; act.BillingLongitude = ''; } update AccountList; } global void finish(Database.BatchableContext BC){ } }
RemoveBillingInfo obj = new RemoveBillingInfo(); Database.executeBatch(obj) ;
uou can check BAtch functionaity here
Click on new
Pase Below code : Click on save.
Now go to your Name on top bar/ Navigation bar. Select Developer Console.
After opening developer console. Press CTRL + E
New small window will be opened.
paste following code in this.
Click on execute button. and wait for some time becuase batch class takes some time to execute and process the reocrds becuase it is a bulk operation.
If above answer helps you to done the task. Please select answer as a solution.