2

是否可以在 ax 2009 的运行时将表设置为临时表?

4

1 回答 1

3

您可以使用该方法将记录缓冲区标记为临时的setTmp。如果您想避免在方法中进行的任何其他更新,请记住调用doInsert方法而不是方法。insertinsert

要让第二个记录缓冲区引用同一个临时表,请使用该setTmpData方法。

此测试作业说明了用途:

static void TmpTest(Args _args)
{
    CustTable custTable, custTable2;
    ;
    custTable.setTmp();
    custTable.AccountNum = "123Tmp";
    custTable.Name = "Temporary?";
    custTable.doInsert();

    custTable2.setTmp();
    custTable2.setTmpData(custTable);
    select custTable2 where custTable2.AccountNum == "123Tmp";
    info(custTable2.Name);
}
于 2011-09-19T09:45:51.973 回答