Value cannot be null (BusinessEntity) when using Update ServiceNow Record

@marian.platonov

Just as the subject says, I’m getting this error when using the Update ServiceNow Record activity:

Update ServiceNow Record: Value cannot be null. (Parameter 'BusinessEntity')

The Update ServiceNow Record activity is inside a ServiceNow Application Scope activity which uses ExistingServiceNowConnection.

For the Update ServiceNow Record activity, I did not use the Configure button to enter the Endpoint Url, Client Id, and Client Secret. I should not have to…that’s supposed to be the point of the ServiceNow Application Scope and the existing connection.

Does Update ServiceNow Record not inherit the connection from the ServiceNow Application Scope?! And the Update ServiceNow Record configuration window doesn’t accept variables - I need to get these values from variables (ie we get the endpoint from Config, and the Id and Secret from a Get Credential activity).

Also, if you don’t put the Update ServiceNow Record activity inside the ServiceNow Application Scope activity, it tells you that it’s only valid within the Scope. So that implies that it should get its connection info from the Scope, but it appears it does not.

Oh I figured it out by configuring it and then looking at Main.XAML in Notepad.

Without configuring:

<usa:UpdateRecord BusinessEntity="{x:Null}" BusinessEntityName="{x:Null}" SelectedFields="{x:Null}" Status="{x:Null}" AdditionalFields="[UpdateRow]" CrudOperation="Update" DisplayName="Update ServiceNow Record" sap:VirtualizedContainerService.HintSize="382,94" sap2010:WorkflowViewState.IdRef="UpdateRecord_1">

After configuring:

<usa:UpdateRecord Status="{x:Null}" AdditionalFields="[UpdateRow]" BusinessEntityName="Catalog Task (sc_task)" CrudOperation="Update" DisplayName="Update ServiceNow Record" sap:VirtualizedContainerService.HintSize="382,94" sap2010:WorkflowViewState.IdRef="UpdateRecord_3">

It also adds some other code after that to further expand on the BusinessEntity info, among other things.

So BusinessEntity is just the target table name (I used sc_task). Entering the authentication info in the Configure window is just to get connected so you can then choose the table. Seems like it would be simpler to just allow us to enter the table as a property of the activity.

I was thinking it would determine the target table using the sys_id of the record, but it doesn’t.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.