Find number of Deleted Salesforce Pending Service Routing Records
SOQL with ALL ROWS can be used in Apex to find number of Deleted Salesforce Pending Service Routing Records. System.debug( 'No of deleted PSRs is ' + [ SELECT COUNT() ....
SOQL with ALL ROWS can be used in Apex to find number of Deleted Salesforce Pending Service Routing Records. System.debug( 'No of deleted PSRs is ' + [ SELECT COUNT() ....
To find Object Key Prefix using Name in Salesforce Apex, we can use getKeyPrefix() method from DescribeSObjectResult class. Sample Code: DescribeSObjectResult sobjectRes = PendingServiceRouting.sObjectType.getDescribe(); System.debug( 'Key prefix is ' + ....
EncodingUtil.base64Decode() can be used to convert Base64 String to Blob value. Then, the blob value can be used in the Messaging.EmailFileAttachment to attach attachment to the Email. Sample Code: List ....
Test.load() can be used to load Data from Static Resource in Salesforce Test Class. The Static Resource should contain a csv file. 1. Create a csv file with sample data. ....
isExternalID() from the Schema.DescribeFieldResult can be used to find External Id fields in an Salesforce Object. Sample Apex Code: DescribeSObjectResult sObjectRes = Account.sObjectType.getDescribe(); Map < String , Schema.SObjectField > mapFieldList ....
Option 1: System.debug( 'Create Allowed? ' + Schema.sObjectType.Account.isCreateable() ); System.debug( 'Update Allowed? ' + Schema.sObjectType.Account.isUpdateable() ); System.debug( 'Delete Allowed? ' + Schema.sObjectType.Account.isDeletable() ); Option 2: DescribeSObjectResult sobjectRes = Account.sObjectType.getDescribe(); System.debug( ....
EventBus.EventPublishSuccessCallback and EventBus.EventPublishFailureCallback interfaces can be used in an Apex Class to track Successful and Failure Salesforce Platform Events. Sample Apex Class: public class PlatformEventHandler implements EventBus.EventPublishSuccessCallback, EventBus.EventPublishFailureCallback { public ....
Exception: System.InvalidParameterValueException: Invalid private key. Must be 16 bytes. Resolution: When we use Crypto.encryptWithManagedIV(), the key should be at least 16 bytes. Sample Code: /* Encryption */ Blob key = ....
1. Use the following SOQL to get the CallCenterId. SELECT Id, Name FROM CallCenter 2. Use the following Apex code to create the VoiceCall record. Sample Apex Code: insert new ....
To have fixed Header in Salesforce Lightning Web Component Lightning Datatable, set a height to the lightning datatable using a div tag. Sample Code: Apex Class: public class AccountController { ....