SO postings are taking long time in Batch Job

Dear All,

I have created a batch job using Sysoperation framework in AX 2012. I am calling Sales order Posting routine in the batch.

When I run the class through menu item manually, SO posting takes only 2-3 seconds. But through batch job scheduled, SO having even single line and single quantity is taking more average of 3 mins per SO for posting.

Request your expert advice in this case. Its a bit urgent for me.

Best Regards,

Nagesh

What do you mean by sales posting? Is that a Custom code?(Invoice, packing slip etc…)

Do you mean that the batch job is been executing status for so much time? (or) Is it just a problem with the recurrence setup?

SO posting already supports batch processing. Why did you create a new class for it? Is performance better if you use the standard solution?

Hi Kranthi,

By Sales posting I mean Picking list, Packing, Invoicing.

For your second query, recurrence is not an issue. The batch is taking 3 minutes to post one single Sales order. So if there are 10 SO’s getting posted in one recurrence, the batch is taking 10 * 3 = 30 mins approx.

On the other hand, if I execute the above batch using menu item from UI, all 10 SOs get posted within a minute.

Rgds,

Nagesh

Hi Martin,

There is a table which contains list of Sales order numbers that has to be invoiced. As per the code written, the code loops trough the table, picks the sales Ids and calls the standard Sales order posting classes for each SO.

Best Regards,

Nagesh

We don’t know your code.

Have a look at this, blogs.msdn.microsoft.com/…/