Posts

Showing posts from November, 2022

How to get sessionid and salesforce org base url in salesforce

 old : string getSessionId=UserInfo.getOrganizationId().substring(0, 15) + ' ' +  UserInfo.getSessionId().substring(15); string loginUrl=URL.getSalesforceBaseUrl().toExternalForm()+'/secur/frontdoor.jsp?sid='+getSessionId; System.debug('>>>>>>>DEBUG>>>>>>>>>>>'+loginUrl); =========================================== new 12-6-2024 1. string getSessionId=UserInfo.getOrganizationId().substring(0, 15) + ' ' +  UserInfo.getSessionId().substring(15); string loginUrl='/secur/frontdoor.jsp?sid='+getSessionId; System.debug('>>>>>>>DEBUG>>>>>>>>>>>'+loginUrl); 2. ofter domain we need to add step1 output then we get full url for login using sessionid in salesforce. =========================================================== 1 : domain: 2 : add url : / secur/frontdoor.jsp?sid= 3: org id: 00D6u0000004Y50 4. session: 5. sessio id means : org ...

How to handle recursive trigger in apex salesforce

 https://help.salesforce.com/s/articleView?id=000386331&type=1

How to check empty sring in salesforce flow

  {!$GlobalConstant.EmptyString} Note : this will work for Text type of datatype in flow.

How to assecc varible in flow - Salesforce

for suppose u are created varible in flow like "GetEmailRecord"  then as below u need to assign that variable to other varible or object field {!GetEmailRecord}

How to get old record in flow salesforce or how to refer old record

 How to get old record in flow salesforce or how to refer old record {!$Record__Prior.Status} current record {!$Record.Status}

How to add current datetime to datetime field in flow Salesforce

when there is a date time field in object and if we need to add current date time to that field based on some condition in flow salesforce we will use this variable.    {!$Flow.CurrentDate} {!$Flow.CurrentDateTime}