Error updating AX entities using the Dynamics 365 for Operations connector in Logic Apps

When trying to update an entity via the Dynamics 365 connector you may encounter the following error.

{ “status”: 400, “message”: “Only 1 of 2 keys provided for lookup, provide keys for SalesOrderNumber,dataAreaId.”, “source”: “127.0.0.1” }

One would think passing the ItemInternalId guid value which is the primary key for the entity as the Object Id property would be adequate to find the record to update. Seems not by the error being thrown back.

image

 

Apparently you need to supply the 2 keys,  SalesOrderNumber and dataAreaId  which was mentioned in the error response message as the Object Id as shown below. Note the comma between the sales order number (Sales Order) and the dataAreaId (Company)

image

So the item path for the entity to update looking from the code view would look like this:

image

Enjoy…

 

Advertisements
This entry was posted in Azure, Logic Apps. Bookmark the permalink.

2 Responses to Error updating AX entities using the Dynamics 365 for Operations connector in Logic Apps

  1. Kannan says:

    HI Im getting an error “message”: “Only 2 of 1 keys provided for lookup, provide keys for ProductNumber/ when i try to update distinctproduct entity in ax

    • mmorar says:

      Hi, from the error looks like you are providing 2 keys and it only requires the ProductNumber. Seems like that forward slash after the ProductNumber should not be there. Try updating with a hard coded value, do you still get the same error?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s