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, ...
Answered

Duplicate voucher numbers generated in General Journal

(5) ShareShare
ReportReport
Posted on by 689

Hello Community,

We are facing an issue with a General Journal voucher number sequence in D365FO.

Setup:

  • Continuous = Yes

  • Preallocation = Yes (5 numbers)

  • Automatic cleanup = Yes

Issue:

  • When posting General Journals, we observed that voucher numbers already used and posted (e.g., XXX000000518) are being reissued again after some months.

  • On posting, system throws the error: “This voucher is already posted on X date.”

  • On running the “Check voucher series” report, shortages and gaps appear.

Investigation:

  • It looks like numbers that were already consumed (posted in General Journal) are still marked as Free in the Number Sequence status table. This means the number sequence tracking is out of sync with the actual voucher usage. So when the system allocates numbers again, it incorrectly thinks these vouchers are available, even though they already exist in transactions.

  • This mismatch seems to occur when Continuous + Preallocation are used together.

I have the same question (0)
  • Verified answer
    Giorgio Bonacorsi Profile Picture
    2,147 on at
    Hello,
     
    Please try the following two actions to resolve this issue:
    -In the journal, enable the flag to allocate the voucher during posting.
    -In the sequence number setup, disable the Preallocation option.
     
    Additionally, under General ledger parameters > General, you can choose to activate a validation to check for duplicate entries during posting.
     
    Thank you,
    Giorgio
  • André Arnaud de Calavon Profile Picture
    303,730 Super User 2026 Season 1 on at
    Hi Saalim,

    I haven't seen this in a while. As mentioned by Giorgio, can you try to disable the pre-allocation?

    Can you also tell us if there is a customization for creating the journal lines? Do you allow for manual override of numbers to a lower or higher number?

     
  • Verified answer
    Syed Haris Shah Profile Picture
    1,572 Super User 2026 Season 1 on at
    Hi Saalim,
     
    This issue is occurring because of the combination of Continuous + Preallocation, which is not recommended by Microsoft.
     
    When both are enabled, the NumberSequenceStatus table can sometimes get out of sync with the actual voucher usage. This causes numbers that were already posted to remain marked as “free,” and later, the system tries to reissue them, leading to the duplicate voucher error. I recommend disabling preallocation for continuous sequences would resolve your issue.
     
     
    If you find this answer helpful, please consider verifying the answer. 👍
     
    Regards,
    Syed Haris Shah
     
     
  • Verified answer
    Sagar121 Profile Picture
    1,160 Super User 2026 Season 1 on at

    Hi,

    Can you please run the clean-up and then check the report again/ do posting again? I would recommend trying this first in an identical Non-Prod database.

  • Aditya Pal Profile Picture
    198 on at

    This issue happens because the Continuous + Preallocation setup is being used together for the General Journal voucher number sequence. Microsoft does not recommend this combination, as it can cause the NumberSequenceStatus table to become out of sync with actual voucher usage. When this happens, vouchers that are already posted remain marked as “free” and get reissued later, leading to duplicate voucher errors.

    1. Disable Preallocation for the continuous voucher number sequence:

    2. Go to Organization administration > Number sequences > Number sequences, select the voucher sequence, and uncheck Preallocation

        
    3. Enable voucher allocation at posting in the General Journal setup so vouchers are only assigned when posting occurs.

    4. Run the Number sequence cleanup job and then check the Voucher series report to confirm the gaps/shortages are fixed.

    5. (Optional, but recommended) In General ledger parameters > General, enable Check for duplicate voucher numbers during posting to prevent re-use of existing numbers.

    6. Make sure there are no customizations or manual overrides that set voucher numbers directly.

    You can detect numbers that are posted but still marked as free in NumberSequenceStatus with a SQL query

    SELECT ns.NumberSequence,

           ns.SegmentValue AS VoucherNumber,

           ljt.Voucher,

           ljt.Posted,

           ljt.TransDate

    FROM NumberSequenceStatus ns

    JOIN NumberSequenceTable nst

        ON ns.NumberSequence = nst.NumberSequence

    LEFT JOIN LedgerJournalTrans ljt

        ON ljt.Voucher = ns.SegmentValue

    WHERE ljt.Voucher IS NOT NULL

      AND ns.Status = 0  -- 0 = Free

    ORDER BY ljt.TransDate DESC;
     

  • Verified answer
    Yng Lih Profile Picture
    1,612 Super User 2026 Season 1 on at
    Hi,
     
    I would probably do the following:
    1) Disable pre-allocation for continuous sequences
    2) Disable voucher allocation at posting 
     
    3) Run the number sequence cleanup job
    4) Enable duplicate voucher number checks during posting (For audit compliance purpose)
     
     
    If this information was helpful, kindly mark it as 'Verified'. Thank you. :)
     
     

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 663

#2
André Arnaud de Calavon Profile Picture

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

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 337 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans