Queueable Apex
Queueable Apex is similar to future methods, but provide additional job chaining and allow more complex data types to be used. Queueable Apex allows you to submit jobs for asynchronous ....
Queueable Apex is similar to future methods, but provide additional job chaining and allow more complex data types to be used. Queueable Apex allows you to submit jobs for asynchronous ....
When you face System.QueryException: unexpected token: 's' issue, use String.escapeSingleQuotes() method to avoid this exception. Sample SOQL: String SOQL = 'SELECT Id, Name, ( SELECT Id, Name FROM ....
getSobjectType() can be used to get Object Name from the Id value using Salesforce Apex. So, we can get the object name using record id. Check the following code for ....
To call Future methods from Process Builder, call the future method from the in-vocable method. Check the below code for reference. Sample Code: public class LightningProcessBuilder { @InvocableMethod public static ....
Create an Email Template. Note down the Email Template Id. Create a Contact record with the Name "Do Not Delete". Use the dummy Do Not Delete Contact Id in the ....
💡 Mastering Test.setCreatedDate(): How to Set Record CreatedDate in Salesforce Test Classes? Why Control CreatedDate in Your Salesforce Tests? 📅 As a Salesforce developer, you often encounter Apex code, like ....
ConnectApi.MentionSegment in Salesforce Apex can be used to find @mentioned user from Feed Item. Sample Feed Item: Sample Code: String communityId = null; for ( FeedItem objFI : [ SELECT Id ....
Sample Code: Date date1 = System.today(); Date date2 = System.today().addMonths(23); system.debug('No of months ' + date1.monthsBetween(date2)); String noOfYears = String.valueOf(date1.monthsBetween(date2) / 12) + ' Year(s) ' + String.valueOf(Math.mod(date1.monthsBetween(date2), 12)) + ....
The return type of a SOSL search is List of List of sObjects. Sample Code: List<List<SObject>> searchList = [FIND 'map*' IN ALL FIELDS RETURNING Account (Id, Name), Contact, Opportunity, Lead]; ....
Declaring variables as transient reduces view state size. A common use case for the transient keyword is a field on a Visualforce page that is needed only for the duration ....