I can't update sales order by AIF using the following XML file.
Message says that "Cannot update record - the record does not exist.".
And this message is @SYS112449.
--------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8" ?>
<Envelope xmlns="http://schemas.microsoft.com/dynamics/2008/01/documents/Message">
<Header>
<MessageId />
<SourceEndpointUser>contoso\Administrator</SourceEndpointUser>
<SourceEndpoint>FileAdapter</SourceEndpoint>
<DestinationEndpoint>LocalEP</DestinationEndpoint>
<Action>http://schemas.microsoft.com/dynamics/2008/01/services/SalesOrderService/update</Action>
<ConversationId />
</Header>
<Body>
<MessageParts xmlns="http://schemas.microsoft.com/dynamics/2008/01/documents/Message">
<EntityKeyList xmlns="http://schemas.microsoft.com/dynamics/2006/02/documents/EntityKeyList">
<EntityKey xmlns="http://schemas.microsoft.com/dynamics/2006/02/documents/EntityKey">
<KeyData>
<KeyField>
<Field>SalesId</Field>
<Value>SO-101253</Value>
</KeyField>
</KeyData>
</EntityKey>
</EntityKeyList>
<SalesOrder xmlns="http://schemas.microsoft.com/dynamics/2008/01/documents/SalesOrder">
<SalesTable class="entity" action="update">
<_DocumentHash>5c6d97a737419b29e23c69a70765fba0</_DocumentHash>
<DeliveryDate>2012-04-29</DeliveryDate>
<PurchOrderFormNum>1</PurchOrderFormNum>
<SalesLine class="entity" action="update">
<ItemId>1001</ItemId >
<SalesQty>5</SalesQty>
<SalesUnit>ea</SalesUnit>
</SalesLine>
</SalesTable>
</SalesOrder>
</MessageParts>
</Body>
</Envelope>
-----------------------------------------------------------------------------
Although the document read by AIF is as following.
------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<Envelope xmlns="http://schemas.microsoft.com/dynamics/2008/01/documents/Message">
<Header><MessageId>{E6D579B1-1C3F-40D5-858B-255CB17F83A4}</MessageId>
<SourceEndpoint>LocalEP</SourceEndpoint><DestinationEndpoint>FileAdapter</DestinationEndpoint>
<Action>http://schemas.microsoft.com/dynamics/2008/01/services/SalesOrderService/read</Action>
<RequestMessageId>{A5BF71EF-100F-4DA2-B342-A65DD51C08C3}</RequestMessageId>
</Header>
<Body><MessageParts xmlns="http://schemas.microsoft.com/dynamics/2008/01/documents/Message">
<SalesOrder xmlns="http://schemas.microsoft.com/dynamics/2008/01/documents/SalesOrder">
<SalesTable class="entity">
<_DocumentHash>5c6d97a737419b29e23c69a70765fba0</_DocumentHash>
<DeliveryDate>2012-04-27</DeliveryDate><PurchOrderFormNum />
<SalesLine class="entity">
<ItemId>1003</ItemId><SalesQty>1.00</SalesQty><SalesUnit>ea</SalesUnit>
</SalesLine>
<SalesLine class="entity">
<ItemId>1001</ItemId><SalesQty>1.00</SalesQty><SalesUnit>ea</SalesUnit>
</SalesLine>
</SalesTable>
</SalesOrder>
</MessageParts>
</Body>
</Envelope>
------------------------------------------------------------------------------
Therefore I can't imagine the reason of the above error . This error ocuurs in the deserializeSubEntitiy method of the AxdBase class.Actual line of error occurs at 61 and this caused by the empty result of the following command.
I checked the _dataSourceName then found that it is "SalesLine".
------------------------------------------------------------------------------
// Find the corresponding existing record
entityEntry = this.findEntityOnCurLevel(_dataSourceName,_axInternalBase);
------------------------------------------------------------------------------
Does anyone have any idea of solving this problem.
↧
Failed in partial updating sales order
↧