Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Variables 如何在RunBaseBarch类中使用InMemory表参数?_Variables_Batch Processing_Axapta_X++_Dynamics Ax 2012 - Fatal编程技术网

Variables 如何在RunBaseBarch类中使用InMemory表参数?

Variables 如何在RunBaseBarch类中使用InMemory表参数?,variables,batch-processing,axapta,x++,dynamics-ax-2012,Variables,Batch Processing,Axapta,X++,Dynamics Ax 2012,我通过parm方法传递自定义类exendedRunBaseBatch中的InMemory表 但我不能看到这个表,我可以使用和查看其他传递的变量(如string或int),但我丢失了对InMemory表的引用 如果我没有扩展RunBaseBatch,我就能够使用并查看传入的InMemory表 可以在RunBaseBatch类中使用InMemory表吗?否则有什么办法 谢谢。尝试添加以下方法: protected boolean canSwapBetweenCS() { return fal

我通过parm方法传递自定义类exended
RunBaseBatch
中的InMemory表

但我不能看到这个表,我可以使用和查看其他传递的变量(如string或int),但我丢失了对InMemory表的引用

如果我没有扩展RunBaseBatch,我就能够使用并查看传入的InMemory表

可以在RunBaseBatch类中使用InMemory表吗?否则有什么办法


谢谢。

尝试添加以下方法:

protected boolean canSwapBetweenCS()
{
    return false;
}
根据内存表创建其值的位置,它可能会丢失对数据的引用(使用
setTmpData
设置)。这些方法表示它不喜欢在客户端和服务器之间限制数据


如果记录是在
run
方法的作用域之外创建的,也不要指望它能成批工作。

考虑接受答案。感谢@Jan B.Kjeldsen,我在batch类的run方法之外(之前)创建了一个临时表。然后,在使用临时表之前,您将在类中调用
setTmpData
。简单的解决方法是为类创建一个具有此目的的方法。在创建记录之后,但在调用run之前调用它。此外,您必须在同一层上(即类上没有服务器属性)。@感谢Jan B.Kjeldsen提供有关Tmp表的信息。