axapta - Ax 2012 tts error -
hi facing error while updating record in invent table. using following sample code.
static void job4(args _args) { csinvbomsplitqtycalchelper bomcalc; qty qty; inventtable inventtable; inventtable updateinventtable; bom bom; boolean result; bomid bomid; bomversion bomversion; itemid item = "1000m-3c-pcs"; select firstonly * bomversion bomversion.active == true && bomversion.itemid == item && csislengthitem(item) == false; if (0 != bomversion.recid) { select * bom bom.bomid == bomversion.bomid exists join inventtable bom.itemid == inventtable.itemid && inventtable.csislengthitem == true; } if (0 != bom.recid) { result = true; bomcalc = csinvbomsplitqtycalchelper::construct(item); qty = bomcalc.getadvicedbomspoolqty(); } ttsbegin; while select forupdate updateinventtable updateinventtable.itemid == item { updateinventtable.csinvbomsplitqty = qty; updateinventtable.update(); } ttscommit; info(strfmt('%1, %2, %3', result, qty, inventtable.csinvbomsplitqty)); }
this error get:
please me in resolving issue.
the error not caused job (but maybe earlier version).
just run small job reset tts level:
static ttsabort(args args) { ttsabort; }
tts level errors caused programming errors, calling return
before ttscommit
.
Comments
Post a Comment