AX 2012 TTS错误 [英] Ax 2012 tts error

查看:66
本文介绍了AX 2012 TTS错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在更新发明表中的记录时遇到错误.我正在使用以下示例代码.

HI i am facing an error while updating a record in the invent table. I am using the 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 * from bomversion
            where bomversion.Active == true
            && bomversion.ItemId    == item
            && csIsLengthItem(item) == false;

    if (0 != bomVersion.RecId)
    {
        select * from bom
            where bom.BOMId                 == bomversion.BOMId
        exists join inventTable
            where 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
        where updateInventTable.ItemId == item
    {
        updateInventTable.CsInvBOMSplitQty = qty;
        updateInventTable.update();
    }

    ttsCommit;

    info(strFmt('%1, %2, %3', result, qty, inventTable.CsInvBOMSplitQty));
}

这是我得到的错误:

请帮助我解决此问题.

推荐答案

该错误显然不是由此作业引起的(但可能是较早的版本).

The error is obviously not caused by this job (but maybe an earlier version).

只需运行此小任务即可重置TTS级别:

Just run this small job to reset the TTS level:

static ttsAbort(Args args)
{
    ttsabort;
}

TTS级别错误通常是由编程错误引起的,例如在ttsCommit之前调用return.

TTS level errors are usually caused by programming errors, say calling return before ttsCommit.

这篇关于AX 2012 TTS错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆