Posts

Apex best Practices in salesforce

* if we need to create multiple test records in test class we can create list and then do single insert operation because database operation or dml operation are slow when compared to apex operations. * No soql inside forloop * In ofter trigger we con't directly use trigger context variables(listofnewrexords) we need to soql if we need to change same records. * 

How to get Current recordId to flow from quickaction in salesforce

Image
 Resolution :  1.create new resource as text type variable. 2. Remember Variable API name should be as "recordId". 3.We don't need to assign value to this variable, it will automatically fetch from current page. 4. refer where ever we need current recordpage  recorded in flow as we use general flow variable.

Vs code Command Pallet

Ctrl + Shift + P --- to launch command pallet in vscode 1. SFDX: Turn On Apex Debug Log for Replay Debugger // to enable our break points or log in our org // enable debug features in vscode. 2. SFDX: Get Apex Debug Logs // this is for getting apex logfiles in to vscode

How to mention casenumber in email subject in email template salesforce

  -{!Case.CaseNumber}

Admin Learning Links Salesforce

Picklist Administration Choose the right picklist field for the job, manage picklists, and share picklist values. Add or Edit Picklist Values

Salesforce apex Inboung email test class

 Main class :  global class EmailCatcherHandler implements Messaging.InboundEmailHandler {       global Messaging.InboundEmailResult handleInboundEmail(Messaging.InboundEmail email, Messaging.InboundEnvelope envelope) {           Messaging.InboundEmailResult result = new Messaging.InboundEmailresult();                      string emailBody = email.subject;           System.debug('email.subject --- '+email.subject);           list<string> emailSplits = emailBody.split('-');           string caseNum = emailSplits[1];           caseNum = caseNum.trim();           Case caseRecord = [Select id from Case where caseNumber =: caseNum];                      Task tObj = new Task();         ...

Image test eventsx

Image