How to get Salesforce Access Token and execute SOQL using Apex?
1. Add the Salesforce My Domain URL in your Remote Site Settings in Setup in the Source org. Remote Site Setting: 2. Create a Connected app in the target org. ....
1. Add the Salesforce My Domain URL in your Remote Site Settings in Setup in the Source org. Remote Site Setting: 2. Create a Connected app in the target org. ....
? 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 ....