Rec Fields Required in AIF Partial Update

I was included in an e-mail thread recently that discussed what fields are needed in a partial update. To make a long story short, you need the _DocumentHash field as well as the RecId and RecVersion fields for each entity being updated.

Partial updates were introduced in AIF in Microsoft Dynamics AX 2009 so that you could send selective updates and not have to send an entire document (all fields for all entities) to update a single field.

When performing an update, the typical process is: (1) read the data, (2) make changes, (3) send the changes back to Dynamics AX. When you read the data, a field called _DocumentHash is returned in the parent entity. This field is used for concurrency so if any one of the records in the update changes in between the time the data was read and the time the changes were sent to AX, an error is generated.

In addition to the _DocumentHash field in the parent record, you also need to send the RecId and RecVersionId for each child record being updated. The attached graphic is an example of XML generated for a partial update to a customer record. For more information about the document hash and concurrency, see Concurrency When Updating Data.