How to find Date fields in the objects in Salesforce?
In the following sample code, I have searched Date data type fields in Account, Lead and Opportunity objects. Sample Code: Set < String > listsObjs = new Set < String ....
In the following sample code, I have searched Date data type fields in Account, Lead and Opportunity objects. Sample Code: Set < String > listsObjs = new Set < String ....
Trigger.isExecuting can be used to find whether apex is currently executed in Trigger Context in Salesforce. Sample Code: System.debug( 'Is it in trigger context ' + Trigger.isExecuting ); Output: https://youtu.be/2aRs-zMcSQA
1. Sample Custom Object. 2. Create Remote Site Settings for API Endpoint. 3. Sample Code to override the Standard New button in the custom object. Apex Class: public class CreateCustomerRecord ....
Sample Code: Visualforce Page: <apex:page controller="SampleVFPageController"> <apex:form > <apex:pageBlock > <apex:pageBlockSection > ....
replaceAll() method can be used to remove all non-numeric present in a variable using Apex in Salesforce. Sample Code: String str = 'abc123xyz!@#$%^&*()_+'; String myOutStr = str.replaceAll( '[^0-9]', '' ); ....
1. Future MethodWe can avoid Mixed DML issue by running two different transactions. Call outs to the external Web Services can be executed asynchronously.2. Batch ApexMainly used for large data ....
Standard Messaging Session Transfer feature is not currently available in Salesforce. Vote for the following idea for the standard Messaging Session Transfer feature in Salesforce. https://ideas.salesforce.com/s/idea/a0B8W00000GdmJtUAJ/messaging-agent-transfers If the above Standard ....
Chat Session records are stored in LiveAgentSession entity. Following Sample code can be used to delete the Chat Session records permanently(hard delete). Sample Code: List < LiveAgentSession > listLiveAgentSessions = ....
KnowledgeArticle is parent entity. KnowledgeArticleVersion is child entity. When a new Knowledge Article is created, it creates an entry in KnowledgeArticle and also in KnowledgeArticleVersion. When a new Knowledge Article ....
Sample Code: public class SampleQueueableClassWithFinalizer implements Finalizer, Queueable { private String strError; public void execute( QueueableContext ctx ) { try { ....