Safe Navigation Operator in Salesforce Apex
? in Salesforce Apex used for Safe Navigation Operator. The safe navigation operator (?.) can be used for checking null references. Sample Code: Account objAcc; if ( String.isNotBlank( objAcc.Name ) ....
? in Salesforce Apex used for Safe Navigation Operator. The safe navigation operator (?.) can be used for checking null references. Sample Code: Account objAcc; if ( String.isNotBlank( objAcc.Name ) ....
Messaging.reserveSingleEmailCapacity will thrown an error: System.NoAccessException: The organization is not permitted to send email if the Email Deliverability is not set in Salesforce. So, using it we can check whether ....
We can use lightnging-card and lightning/navigation to show New button as top level action along with lightning-datatable. Sample Code: Apex Class: public class AccountController { @AuraEnabled( cacheable = true ) ....
Row Actions can be allowed on Row Selection in Salesforce Lightning Web Component Lightning Data Table using Dynamic Row Actions. Sample Code: Apex Class: public class AccountController { @AuraEnabled( cacheable ....
Queueable interface can be used to attach a Salesforce Visualforce as PDF to an outgoing email from trigger. Sample Visualforce page: <apex:page standardController="Account"> <apex:pageBlock > <apex:pageBlockSection > <apex:pageBlockSectionItem >Account Name</apex:pageBlockSectionItem> ....
Exception: You can't create a contact for this user because the org doesn't have the necessary permissions. Contact Salesforce Customer Support for help. The Salesforce Exception "You can't create a ....
Exception: System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out Callouts are not allowed when there is an uncommitted transaction pending. For example, if a save ....
Apex Classes assignment to a Profile are stored in SetupEntityAccess entity/object. So, by filtering ParentId with the Profile's Permission Set Id and SetupEntityType = 'ApexClass', we can fetch the Apex ....
Exception: System.TypeException: Cannot have more than 10 chunks in a single operation. Please rearrange the data to reduce chunking. This exception is thrown when List < sObject > variable has ....
Convert the Map Data Type values returned from the Apex Class to an array to display it on the screen using the Lightning Web Component. Sample Code: Apex Controller: public ....