How to Mass Update Records In Salesforce

How to Mass Update Records Using Developer Console Anonymous Window
In this blog, you will learn how you can mass update records in salesforce using Developer Console Anonymous Window.

Follow Below Steps
  • Go to Setup
  • Open Developer Console
  • Go To Debug menu
  • Select Open Execute Anonymous Window from dropdown

List<Account> updateListofAccounts = new List<Account>();
List<Account> accountList = [Select Type From Account Where Type = ''];
for(Account acc:accountList){
acc.Type ='Prospect';
updateListofAccounts.add(acc);
}
if(updateListofAccounts.size()>0){
Update updateListofAccounts;
}

  • Click on Execute


Follow Us

Posted By : Sudeer Kamat Date :

view_module Related

label Labels

Comments 0