Microsoft.Dynamics.BusinessConnectorNet.XppException: Item identification cannot be changed when inventory transactions have been generated.

By dsandor at July 16, 2009 23:59
Filed Under:

Obscure error, simple solution. 

So my problem was that I was creating a PurchTable record in C# (.NET Business Connector) to see if the line existed.  My idea was that if the row existed I would update it and save the updates but if the row did not exist I would create a new PurchLine record for this purchase order.  What I learned is that if you lock a record for update you can not re-use the AxaptaRecord object later for a different operation.

Instead of reusing the same instance of the PurchLine object I had to create a new instance with the code:

axPurchLineRec = ax.CreateAxaptaRecord("PurchLine");

 

This solved my problem.  No more “Item identification cannot be changed when inventory transactions have been generated.” error.

Comments are closed