web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

How to learn voucher process in X++

(0) ShareShare
ReportReport
Posted on by 115

Hi experts, 

I am a fresher to D365FO development. I am currently trying to understand the voucher process of a product receipt on setting up the category for accrued purchases.

I created and confirmed a PO with qty as 50 and doing a product receipt for 20 quantities and posting it. As a result of this, two vouchers are being generated. First line is against the account "Accrued Purchases - Received Not Invoiced" and the second against the account "Raw Materials Receipts".

I am trying to understand where exactly in code does microsoft evaluates and assigns the right main accounts for the voucher process. I tried debugging in "LedgerVoucherTransObject" and "LedgerVoucherObject" classes. Can anyone please give me some advice on which are the classes that is responsible for evaluating and assigning the main accounts for vouchers? Or any inputs or methods for me to learn the voucher process technically would help.

Also I wanna know is it possible for me to add another line to the voucher through code on posting the product receipt with one of my custom posting types? This is just purely for my learning no requirement behind it. 

Thanks in advance.  

  • André Arnaud de Calavon Profile Picture
    307,301 Super User 2026 Season 2 on at

    HI John,

    When posting the product receipt, records are created in the subledger framework. These records do represent the posting type, accounts, dimensions and amounts. Another process will transfer these subledger transaction to accounting entries. You can try to reverse engineer or use the debugger when exactly the subledger records are being created.

  • JohnBright Profile Picture
    115 on at

    Hi Andre,

    Thanks for your suggestion will try it out.

  • André Arnaud de Calavon Profile Picture
    307,301 Super User 2026 Season 2 on at

    Hi John,

    Thanks for the update. Please update this question if you would need more specific help on this topic.

  • JohnBright Profile Picture
    115 on at

    Hi Andre,

    Again, thanks for your time.

    I am trying to create extra voucher lines with a different posting type while packing slip is posted for the same voucher. Is it possible to do this?

    If yes, is there any way you could give me some tips on where I could actually customize to add extra voucher lines. I am finding it difficult to figure it out.

    For example as I mentioned above, two voucher lines are created on posting the packing slip with posting types "Purchase accrual" and "Purchase expenditure, un-invoiced". I am trying to add another line to the same voucher with a different posting type. There is nothing wanted to be balanced here as there is no requirement behind it rather I was just asked to try to explore it this way.

    Appreciate any inputs. Thanks in advance.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 523 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 408 Super User 2026 Season 2

#3
CU10121822-0 Profile Picture

CU10121822-0 354

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans