November Happy Hour will be moved to Thursday December 5th.

Salesforce: Object reference error when fetching connector data on site initialization and scheduled job

Found in

EPiServer.MarketingAutomationIntegration.Salesforce 4.0.0

Fixed in

EPiServer.MarketingAutomationIntegration.Salesforce 4.0.1

(Or a related package)

Created

Jul 17, 2018

Updated

Aug 23, 2018

State

Closed, Fixed and tested


Description

Salesforce stores the login result object in a request variable. The process of fetching the data in the initialization module and scheduled job occurs in a parallel loop.
If the request for Salesforce data happens in a thread different from the originating one, the HttpContext is null. This results in a null reference exception.