How to posting multiple pending invoices by batch job x++ ax 2012?

Dear guys,

Anyone has any idea how to post pending invoice by batch job X++ ax 2012? Kindly advice.


What’s the problem? And what kind of invoices it is?

Any invoice if we want to post it via batch job,how to do that?And also after that i want to check xml generated for that invoice,where we can see that.Please advice.

The framework supports batch posting, therefore go to the appropriate menu item (depending on the type of invoice, which you didn’t tell me), set criteria, tick batch posting and confirm.

Posting modifies data in AX database; it doesn’t generally create any files. You’ll have to tell us what you’re trying to achieve.

AP Pending Invoice @ Accounts payable >> Common >> Vendor tax invoices >> Pending vendor tax invoices

After setup the Batch Job, what should I do more to send it to the batch running? Thanks

I know how to customize guys, I just don’t know whether is it a standard function or not? If not, then no choice, I have to customize

Can customize like the below. Any experts can give me your advice? Many thanks
static void Job46(Args _args)

VendInvoiceInfoTable vendInvoiceInfoTable;
PurchFormLetter pfl;
Num num;

vendInvoiceInfoTable = VendInvoiceInfoTable::findPurchId(“PO16000001”,"",true);
if (!vendInvoiceInfoTable.Num && vendInvoiceInfoTable.RecId )
vendInvoiceInfoTable.Num = ‘PO16000001’;
pfl = PurchFormLetter_Invoice::newFromSavedInvoice(vendInvoiceInfoTable);


You don’t have to do anything more, assuming that your system is configured for batch processing.

I have no idea what you mean by the job. Jobs can’t be executed in batch; it’s done by classes of either SysOperation or RunBaseBatch framework.

What I means is I can write the batch class based on that job testing.
But how come I did setup batch group like that, but nothing happen? Not sure what setting I didn’t do. Appreciate your help.


Kind Regards,


Why would you write it again if it already exists?

Regarding batch configuration, I suggest you consult AX documentation: Process batch jobs and tasks [AX 2012].

I need to process running batch for multiple selected pending vendor invoice. As I know MS only allow to run batch for one selected pending vendor invoice per time. I’ll check all the setup as your doc. Thanks Martin.

What you’re saying suggests that you should extend the standard logic, not to reinvent the wheel.