Hello,
I’m attempting to call a Lightning API through the provided UiPath.Salesforce.Activities.LightningRequestApiRequest activity. I have the following configuration:
AcceptFormat: ANY
Method: POST
Resource: [Redacted]
Body: Newtonsoft.Json.JsonConvert.SerializeObject(requestBody, Newtonsoft.Json.Formatting.None)
where requestBody is a Dictionary<string, string> and I can confirm its content is correct.
BodyFormat: application/json
Headers: None
ResultPath: Not Defined
Result: Not Defined
SalesforceStatus: updateProgress
StatusCode: Not Defined
The activity exists within a Salesforce Application Scope. After getting a single record from a database, I am attempting to use an endpoint to update a status record for the item to “In Progress.”
Full exception details here, though it’s not particularly helpful as the NRE doesn’t describe which field it expects to be present:
System.NullReferenceException: Object reference not set to an instance of an object.
at UiPath.Salesforce.ConnectionService.SalesforceConnectionService.InvokeRestApi(String lightningRestResource, String method, String acceptFormat, RestApiBody body, Dictionary`2 headers, String resultPath)
at UiPath.Salesforce.Activities.LightningRestApiRequest.<>c__DisplayClass37_0.<SalesForceExecute>b__0(SalesforceTelemetryOperation operation)
at UiPath.Salesforce.Telemetry.TelemetryServiceBase.Operation[T](String operationName, String activityId, Func`2 method)
at UiPath.Salesforce.Activities.LightningRestApiRequest.SalesForceExecute(CodeActivityContext context)
at UiPath.Salesforce.Activities.SalesforceActivityBase.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
Am I missing some sort of setting here or is there a bug with the activity itself?
Edit: I’m using UiPath.Salesforce.Activities version 1.9.3