My_Test_Repo/force-app/main/default/classes/updatePhone.cls

21 lines
540 B
OpenEdge ABL

global class updatePhone implements Database.Batchable<sObject>
{
global Database.QueryLocator start(Database.BatchableContext BC)
{
String query = 'SELECT Id,Phone FROM Account';
return Database.getQueryLocator(query);
}
global void execute(Database.BatchableContext BC, List<Account> scope)
{
for(Account a : scope)
{
a.Phone = '999999999';
}
Database.update(scope);
}
global void finish(Database.BatchableContext BC) {
}
}