I have a program which calls dispay method via dict table. When I run it via job it is ok.
permissionSet.add(new ExecutePermission());
permissionSet.add(new FileIOPermission(_saveFilename + '.spm' , 'RW'));
CodeAccessPermission::assertMultiple(permissionSet);
dictTable = new DictTable(_record.TableId);
value = dictTable.callObject(_dspMethod, _record);
but when I add it to the batch job I get following error:
System.InvalidProgramException: Common Language Runtime detected an invalid program.
at Dynamics.Ax.Application.MyClassBatch.Run()
at Dynamics.Ax.Application.BatchRun.runJobStaticCode(Int64 batchId) in BatchRun.runJobStaticCode.xpp:line 54
at Dynamics.Ax.Application.BatchRun.runJobStatic(Int64 batchId) in 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)
Is it possible to run in in the batch somehow or it needs to be rewritten?
*This post is locked for comments