Skip to main content



No record found.

Microsoft Dynamics AX forum

Code to count unique voucher numbers in a journal batch

Posted on by 150

Hi ,

I need to return a count of all the unique ( don't count the duplicate ) voucher number of a journal in vedor payment journal.

Can you help me with the code??

  • Verified answer
    Mea_ Profile Picture
    Mea_ 60,274 on at
    RE: Code to count unique voucher numbers in a journal batch

    Just use "group by" to group by voucher and "where" to select only records from the journal required. Here is documentation with examples

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .


André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,835 Super User

Martin Dráb Profile Picture

Martin Dráb 225,526 Super User

nmaenpaa Profile Picture

nmaenpaa 101,148


Featured topics

Product updates

Dynamics 365 release plans