How to schedule a batch to run on client which export data in excel

Hi All,

I am working on AX 2009.I have configured a client batch to export excel file using the steps described in this post.I have also overridden the method ‘runsImpersinated’ on my class to return false. But, when I Start the legacy batch client (Basic → Periodic → Batch → Processing), infolog display just that my batch process is in ‘waiting’ . That’s it, nothing happen there after that. Meanwhile my batch have been executed and i got error message in batch job logs as below:-

The server-side impersonated (RunAs) session tried to invoke a method that is available for client-side processing only. (S)\Classes\myClass\run - line 81 (S)\Classes\BatchRun\runJobStatic - line 62

The line of code generating this error of my ‘run’ method: myClass\run - line 81 :- _sysexcelapplication = SysExcelApplication::construct();

I found the same error as mine in this link, but there is no solution of this issue. please refer this link to understand my issue properly.

It would be great, if anyone can help me with this. I have been searching for this all over but could not find anything helpful.

Thanks in Advance, Amit

Create a special batch group for client processing and configure the batch server(s) not to process this group (Administration > Setup > Server configuration). Then choose this batch group in Basic → Periodic → Batch → Processing.

Hi Martin,

I have already created special batch group ‘Client’ and now configured the batch server not to process this group (Administration > Setup > Server configuration) by keeping it under ’Remaining groups’ in Batch server groups tab. I have already selected this special group(Client) in Basic → Periodic → Batch → Processing. But still its not working, Infolog just displays that batch group ‘Client’, private ‘No’ and status ‘waiting’.

The task used to be processed by batch server. Do I understand correctly that this particular problem is now resolved?

Is your batch task associated with the new batch group?

Yes, My batch task is associated with the new batch group('Client’) but the problem is still not resolved.

Previously, the batch task used to be processed by batch server as my batch group was under 'Selected groups’(Administration > Setup > Server configuration > Batch server groups tab*)*. But after keeping my batch group under 'Remaining groups’ as per your suggestion , the batch tasks associated with this batch group will not be processed by batch server.(Correct me if I am wrong).

Before i have kept my batch group under 'Selected groups’. So when I Start the legacy batch client (Basic → Periodic → Batch → Processing) with selecting my batch group 'Client’ infolog just displays that my batch process is in ‘waiting’ and in the back end i can find that batch job got executed(might be processed by batchserver) and i got the error in log(Basic → Inquiries → Batch job → Log).

Now as i have kept the batch group under ‘Remaining groups’ (not to process my batch group by batchserver), my batch task does not get executed from back end and remain in the status ‘waiting’ only in both window(legacy batch client and batch jobs(Basic → Inquiries → Batch job))

Do i need to make any other basic configuration to run batch task on client?



I think I realized the problem. If your task had the right run location, it wouldn’t ever be picked up by the batch server. Open your batch job, then its tasks and check the Run location field. It should be Client but I think it’s Server in your case.

(I’m looking into AX 2012; hopefully it’s the same in AX 2009.)

I have checked my batch task, its Run Location field’s value is ‘Client’. I have attached here a screenshot of batch job and batch task for your reference. please check all the fields of my batch job & batch task and let me know if any field i need to change.

Now I have kept back my batch group under ‘Selected groups’(Administration > Setup > Server configuration > Batch server groups tab*).* So the batch task is in status ‘Executing’ from last night(last 12 to 13 hours). I am not able to understand this strange behaviors of batch job. It would be great if you can help me to understand it and solve my issue.



I think that something is wrong with your system if the batch server tried to execute client batches. But I guess you’re now using different task than before and it makes little sense to thing about your previous runs. Now the task (correctly) hasn’t been executed.

Did you hide the class name or is there no class associated?

My recommendation is: go through the execution in debugger and you’ll see where it fails. It’s too difficult for me to guess what’s happening in your system.

Hi Martin,

Thanks a lot for your quick reply. Yes, I have kept my class name hidden in the screenshot.

Does the configuration for the batch job & batch task look correct or did I miss anything? Can you please verify this in my screenshot.

Do I need to change any other basic configurations to run batch job on client ? If you have any good links, please provide.