Skip to main content

Posts

Featured

How can we use safe navigation in dynamic SOQL in Salesforce.

Safe navigation can be used in dynamic SOQL. Salesforce rolled out a new feature in Winter 21 release, it's called - SAFE NAVIGATION.  Safe navigation operator is a very useful syntax for Salesforce Developers and it will make the coding clean. The main purpose of this syntax is to avoid null pointer exceptions. String searchKey; String getAccounts = 'SELECT Id,Name FROM Account WHERE Name LIKE \'%' + searchKey?.substring( 0 )+ '%/' '; List<Account> accountList = Database.query(getAccounts);

Latest Posts