Hello,
I’m trying to update the Qty field on the InventJournalTrans Via BusinessConnector in c#. The following is the code I’m wondering what i am doing wrong. The Value comes in as 4 but after the Update the value in AX is 0 and not 4.
ax.Logon(“bsus”, null, null, null);
using (var line = ax.CreateAxaptaRecord(“InventJournalTrans”))
{
line.ExecuteStmt( string.Format("select forupdate * from %1 where %1.JournalId == ‘{0}’ ", journalId));
if (line.Found)
{
ax.TTSBegin();
// You cannot use table fields directly as in X++. Instead you have set/get methods
line.set_Field(“itemId”, itemId);
line.set_Field(“projId”, jobId);
line.set_Field(“qty”, itemQty);
line.Update();
ax.TTSCommit();
}
}