Solved: Update must be performed inside a transaction. (S)\Classes\xRecord\Update

By dsandor at July 17, 2009 00:00
Filed Under:

Dynamics Ax / Axapta 2009

I am using the Microsoft Dynamics Ax 2009 .NET Business Connector to update or insert records in a table.  I received the following error message:

Update must be performed inside a transaction.
(S)\Classes\xRecord\Update

 

The solution was quite simple:

On your main Axapta object that you made your connection with (ax) in my case, e.g. ( Axapta ax = new Axapta(); ) you call the TTSBegin() and TTSCommit() methods around your update call.

 

So for example:

ax.TTSBegin();

axRecord.set_Field(“ColumnName”, “NewValue”);

ax.TTSCommit();

Comments are closed