Salesforce Fact #329 | Sobject record in map key

Do you know we can keep Sobject record as key in map collection. If any of the attributes of the Sobject record is updated outside the map, the same gets updated in the map.

In this example, we are fetching 3 accounts having non-blank rating and then populating in the map. Then, we are updating the name of the first account in the list and same gets updated in the map also.

Attached are the screenshots.

 


 

Comments

Popular posts from this blog

Salesforce Fact #192 | Call batch apex from flow

Salesforce Fact #457 | Get current user role name in flow