Maps are pretty useful and can make your code more readable and efficient. In particular, maps can be instantiated in a number of ways. Here is the standard way of instantiating a map: Map<Id, Account> accountsById = new Map<Id, Account>(); However, if you happen to have a list of sObjects you can just pass that …
Category: Apex
Permanent link to this article: https://salesforcebuddy.com/2019/01/salesforce-collections-maps/
Dec 22
Custom Settings
Custom Settings: – Custom Setting in Salesforce is similar to Custom Objects that can be used to persist some sort of data. Most important thing about Custom Setting is, it does not uses our salesforce data storage and resides in the application cache. When using Custom Settings there is no Need of SOQL to retrieve the data. Custom …
Permanent link to this article: https://salesforcebuddy.com/2018/12/custom-settings/
Nov 24
Salesforce Platform Salesforce: Trigger Best Practices
If you are new to salesforce and wondering how to write good code for Apex Triggers, this post is going to explain it. See an instance of Trigger in Account Object trigger AccountHandler on Account (before insert) { for (Account a : Trigger.New) { a.Description = ‘Hello World’; } } The best practice is to …
Permanent link to this article: https://salesforcebuddy.com/2018/11/salesforce-platform-developer-i-certification-summer-18/