what is the right way to batch update salesOrder type ?
I created a class that extended RunBaseBatch.
In this class have a method like this:
while
...
{
...
update_recordset salesTable
setting
SalesType =SalesType::Sales
where salesTable.SalesId ==_salesId;
...
}
the method batch update SalesType from Journal to Sales.this class and method run correct when i test in Jobs but in batch job this throw errors:
-----------
Microsoft.Dynamics.Ax.Xpp.ErrorException: “Microsoft.Dynamics.Ax.Xpp.ErrorException”。
at Microsoft.Dynamics.Ax.MSIL.Interop.throwException(Int32 ExceptionValue)
at Microsoft.Dynamics.Ax.MSIL.cqlCursorIL.UpdateAll(IntPtr table)
at Dynamics.Ax.Application.OP_SalesOrderConfirmtionCreater.Altersosalestype(String _salesId, SalesType _salesType) Position at OP_SalesOrderConfirmtionCreater.AlterSoSalesType.xpp:Line 11
at Dynamics.Ax.Application.OP_SalesOrderConfirmtionCreater.Run() Position OP_SalesOrderConfirmtionCreater.run.xpp:line 17
at Dynamics.Ax.Application.BatchRun.runJobStaticCode(Int64 batchId) position BatchRun.runJobStaticCode.xpp:line 54
at Dynamics.Ax.Application.BatchRun.runJobStatic(Int64 batchId) position BatchRun.runJobStatic.xpp:line 13
at BatchRun::runJobStatic(Object[] )
at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object[] parameters)
at BatchIL.taskThreadEntry(Object threadArg)
------------
Or is there any other way to do that? ( call ax2012 Standard Methods ...)
thinks!
*This post is locked for comments
I have the same question (0)