Announcements
No record found.
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.
000000518
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.
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.
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.
NumberSequenceStatus
Disable Preallocation for the continuous voucher number sequence:
Go to Organization administration > Number sequences > Number sequences, select the voucher sequence, and uncheck Preallocation
Enable voucher allocation at posting in the General Journal setup so vouchers are only assigned when posting occurs.
Run the Number sequence cleanup job and then check the Voucher series report to confirm the gaps/shortages are fixed.
(Optional, but recommended) In General ledger parameters > General, enable Check for duplicate voucher numbers during posting to prevent re-use of existing numbers.
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;
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.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Giorgio Bonacorsi 663
André Arnaud de Cal... 439 Super User 2026 Season 1
Syed Haris Shah 337 Super User 2026 Season 1