Started by Jofar ArcharNov 9, 2021

Open
Salesforce: SOAP Login from Salesforce TO Salesforce

0 VIEWES 0 LIKES 0 DISLIKES SHARE
0 LIKES 0 DISLIKES 0 VIEWES SHARE

I carried out a batch job that makes a webservice call inside the equal salesforce instance, which then is supposed to send emails with a pdf attachment since you can't send pdf attachments without delay from a batch process. My web service call looks like this:

public static void callOut(List ids){ 
        InvoiceAttachmentConnector.InvoiceAttachmentService ws = new InvoiceAttachmentConnector.InvoiceAttachmentService(); 
        ws.SessionHeader = new InvoiceAttachmentConnector.SessionHeader_element(); 
        ws.SessionHeader.sessionId = UserInfo.getSessionId(); 
        ws.handleInvoicePdfAttachment(ids); 
    }

But in batch jobs userinfo.Getsessionid() returns null, consequently i am getting a invalid_session_id exception.

0 Replies

You must be Logged in to reply
Techiio

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

facebooklinkdeintwitter

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Copyright techiio.com @2020 Kolkata, India
made with by Abhishek & Priyanka Jalan
Copyright techiio.com @2020
made with by Abhishek & Priyanka Jalan