How to Mass Update Records In Salesforce
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);
updateListofAccounts.add(acc);
}
if(updateListofAccounts.size()>0){
Update updateListofAccounts;
}
- Click on Execute
Follow Us