• ICM Admin 6
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
Hi Everyone,

I have created an automated process through process builder and process builder calling Apex Class 
See below Apex class which is called from process builder ----- code sample

    global without sharing class ICM_ProcessInvocableClass{    
    @InvocableMethod(label='ICMServiceClass' description='')
    global static void callICMServiceBus(List<String> RecordIdList) {
        string sessionToken = UserInfo.getSessionId(); 
        system.debug('@@@@sessionToken:-- '+sessionToken);
        system.debug('@@@@UserTheme:-- '+userinfo.getUiThemeDisplayed());
        ICM_ServiceBusAPICallClass.CallICMServiceAPI(eachRecId,sessionToken);                
       
   }
}
To pass session id to CallICMServiceAPI method (@feature Method),
The above class called from process builder when our opportunity record is created or edited.

if i edited opportunity record in lightning context our session id is invalid.

please give me solution in this.
 
Hi Everyone,

I have created an automated process through process builder and process builder calling Apex Class 
See below Apex class which is called from process builder ----- code sample

    global without sharing class ICM_ProcessInvocableClass{    
    @InvocableMethod(label='ICMServiceClass' description='')
    global static void callICMServiceBus(List<String> RecordIdList) {
        string sessionToken = UserInfo.getSessionId(); 
        system.debug('@@@@sessionToken:-- '+sessionToken);
        system.debug('@@@@UserTheme:-- '+userinfo.getUiThemeDisplayed());
        ICM_ServiceBusAPICallClass.CallICMServiceAPI(eachRecId,sessionToken);                
       
   }
}
To pass session id to CallICMServiceAPI method (@feature Method),
The above class called from process builder when our opportunity record is created or edited.

if i edited opportunity record in lightning context our session id is invalid.

please give me solution in this.