Thursday, April 9, 2015

Debug Batch job in Ax 2012

Debug Batch job in Ax 2012

Like services that you create in Microsoft Dynamics AX, batch jobs are compiled into CIL and run on the server. Therefore, you must use Visual Studio to debug batch jobs.
Batch jobs are used when you have code that you want to schedule to run at a specific time or in regular intervals. One example is if you have code that performs lots of processing that you want to run when the system is not heavily used. Code that runs as a batch job must be contained in a class that extends the RunBaseBatch class. For more information.
The process for debugging a batch job is similar to debugging a service. When you create your class in X++, you can use the standard Microsoft Dynamics AX debugger. To debug a class that is running as a batch job, you then use the Visual Studio debugger.
The high-level process for debugging a batch job from Visual Studio is as follows:
  1. Open Visual Studio. In Application Explorer, locate the batch job class and open the source code.
  2. Set a breakpoint in the code.
  3. Attach the Visual Studio debugger to the Microsoft Dynamics AX server process (Ax32Serv.exe).
  4. In Microsoft Dynamics AX, schedule the batch job that calls your class to run.
  5. When code execution hits the breakpoint that you set, the context switches to Visual Studio and you can continue to step through the code.

Thanks
B K

Customer transaction automatic settlement for specific customer groups only

Hi Friends, Recently I come to the requirement of my company where I have to automatic settle the customer transaction for the speci...