Creating AP Invoice journal using X++ code in D365FO

Hi All,

I want to create and post AP Invoice journal using X++ code in D365FO.

Please tell me about the possibilities…?

Thanks in Advance…

Can anyone tell me how can i achieve this using classes like AxLedgerJournalTable and AxLedgerJournalTrans in AX 2012

https://dynamicsaxswapt.wordpress.com/2016/06/23/create-invoice-journal-through-code/

Look at PurchFormLetter_Invoice class. You can use cross-references to find out how it’s used in the standard application.

Thanks matrin. Can you tell me how can i handle voucher sequence when i am using more than one line? we are facing voucher imbalance issue while posting with multiple lines whereas it gets posted with a single line.

Can you please elaborate your problem?

Hi Martin,

when the debit and credit lines are not balanced I want the same voucher number to be generated in the journal lines whereas when debit and credit lines are balanced I want the next number seq for the voucher to be triggered and created. How can I achieve this through code in d365. Is there any standard process available to achieve this? Please suggest an answer.

Thanks in Advance,

Gopinath M.

How would you do it manually? Can it be configured? Are are you talking not about creating an invoice from code but changing the way how invoice posting work?

We are creating journal lines by importing a CSV file into d365 using the x++ code, So we wanted to generate the voucher as per the standard process… Please suggest the solution for this?