Search code examples
variablesbatch-processingaxaptax++dynamics-ax-2012

How to use InMemory table parameter in RunBaseBarch class?


I pass by parm method a InMemory table in my custom class exended RunBaseBatch.

But I not able to see this table, I can use and see other passed variable (like string or int), but I lost the reference to InMemory Table.

If I not extend RunBaseBatch I'm able to use and see the InMemory table passed.

It's possible to use InMemory table in RunBaseBatch class? Otherwise there is any way?

Thanks.


Solution

  • Try to add the following method:

    protected boolean canSwapBetweenCS()
    {
        return false;
    }
    

    Depending on where your in-memory table creates its values it might loose it is reference to the data (set with setTmpData). The methods signals it does not like throttling data between client and server.

    Also don't expect it to work in batch, if the records was created outside the scope of the run method.