Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void updaterating(List<Opportunity> oppor)
- {
- Map<Id,Account> accountMap = new Map<Id,Account>();
- for(Opportunity o : oppor){
- if(o.StageName == 'Closed Won'){
- accountMap.put(o.Id, new Account(Id=o.AccountId, rating='Hot',site = o.StageName));
- }
- system.debug('TEstKNocky' + accountmap);
- }
- //Update all the appropriate accounts in a bulkified manner here.
- if(accountMap.size() > 0)
- {
- update accountMap.values();
- }
- }
Add Comment
Please, Sign In to add comment