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

Announcements

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

How to add Purchid and invoiceid fields in Voucher Transactions form

(0) ShareShare
ReportReport
Posted on by
Hi,
 
I need to add Purchid and invoiceid fields in Voucher transactions form. I need to add it as a physical field instead of display methods. Kindly let me know for any possibilities.
 
 
 
Thanks,
Hamza
Categories:
I have the same question (0)
  • Diego Mancassola Profile Picture
    593 on at
    Hello, it's not so easy at all to do that.
     
    If your business requirement accept don't have a real time data, i suggest you that calculate these data after posting using a nightly batch using something like that:
     
    select firstonly vendInvoiceJour
    where vendInvoiceJour.ledgervoucher == GeneralJournalEntry.SubledgerVoucher && vendInvoiceJour.InvoiceDate  == GeneralJournalEntry.AccountingDate;
    if (vendInvoiceJour)
    {
        generalJournalEntry.InvoiceId = vendInvoiceJour.InvoiceId;
        generalJournalEntry.PurchId = vendInvoiceJour.PurchId;
        generalJournalEntry.update();
    }
  • Suggested answer
    Giorgio Bonacorsi Profile Picture
    1,391 on at
    Hello,
     
    About the invoice number, usually each voucher have one invoice number. Hence you can add the "document" field into the voucher for,:
     
    However, if you need to include even the PO a custom solution is required.
    The challenge is that one voucher can aggregate multiple POs, so you’ll need a custom query to break down the voucher structure and view the individual PO details.

    You can follow Diego’s guidance to start building your query.

    Thank you,
    Giorgio

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 705 Super User 2026 Season 1

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 370 Super User 2026 Season 1

#3
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 328

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans