ads

Wednesday, 27 July 2016

Update Existing Records Using List In Salesforce



Developer Console Code :-



 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
      List<Account>  Acclist = [select id,website,name from Account];
      List<Account> Accupdate = new list<Account>();
        
        for(Account acc:Acclist){
            
            acc.website ='www.sfdcfor.com';
            acc.name = 'SFDC ForYou';
              
           Accupdate.add(acc);
         }
        
        update accupdate;


Result :-


No comments:

Post a Comment