You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Error on new company with demo data: "‘Document record ID’ must contain a value in ‘E-document’" #8707
German error text: 'Belegdatensatz-ID' muss in 'E-Beleg' einen Wert enthalten: 'Belegpostennr.=7'. Der Wert darf nicht null oder leer sein.
English translation: ‘Document record ID’ must contain a value in ‘E-document’: ‘Document item no. = 7’. The value must not be null or empty.
Thanks for reporting this. I was not able to reproduce this on the latest:
Version: DE Business Central 29.0 (Platform 29.0.47575.0 + Application 29.0.47676.0)
I can create a new company from CRONUS DE following your repro steps.
Looking at this further, the error trace points to two separate problems that were introduced in v28.
The primary issue: EDocDemodataDE was calling Create Demo EDocs DE at the Transactional demo data level. That codeunit called ContosoInboundEDocument.Generate(), which ran only the "Finish draft" import step. The CreateEDocSampleInvoices event subscriber was not bound at that point, so the purchase header update event did not fire. Without that event, the "Finish draft" step failed to set Document Record ID, and the subsequent TestField("Document Record ID") in PostPurchaseInvoice surfaced the validation error you saw. The call to Create Demo EDocs DE was removed from EDocDemodataDE as part of the v29 work, which is why the issue cannot be reproduced on v29.
A secondary problem in the same codeunit: WorkDate() was modified before the Generate() calls and only restored at the very end of the procedure. If any call threw an error, WorkDate was left permanently modified for the rest of the session. This is the secondary fix in PR microsoft/ALAppExtensions#30006.
Since the main crash is already resolved in v29, the PR addresses the remaining WorkDate state leak, which could still affect any environment where the obsolete codeunit is invoked directly.
Transferring this issue to BCApps. Repo migration to BCApps will complete next Monday. Jeffrey Bulanadi (@jeffreybulanadi), could you recreate the PR here when the repo migration is complete, please?
Activity
github-actions commentedon Mar 5, 2026
This issue has been approved for contribution ✅ Thanks for contributing.
ventselartur commentedon Mar 17, 2026
Hello,
Thanks for reporting this. I was not able to reproduce this on the latest:
Version: DE Business Central 29.0 (Platform 29.0.47575.0 + Application 29.0.47676.0)
I can create a new company from CRONUS DE following your repro steps.
May i ask you to try on the latest?
SchulzOli commentedon Apr 27, 2026
i try to do it on 29.* but i can say that we have a bug on 28.0 as well.
jeffreybulanadi commentedon May 5, 2026
Looking at this further, the error trace points to two separate problems that were introduced in v28.
The primary issue:
EDocDemodataDEwas callingCreate Demo EDocs DEat the Transactional demo data level. That codeunit calledContosoInboundEDocument.Generate(), which ran only the "Finish draft" import step. TheCreateEDocSampleInvoicesevent subscriber was not bound at that point, so the purchase header update event did not fire. Without that event, the "Finish draft" step failed to setDocument Record ID, and the subsequentTestField("Document Record ID")inPostPurchaseInvoicesurfaced the validation error you saw. The call toCreate Demo EDocs DEwas removed fromEDocDemodataDEas part of the v29 work, which is why the issue cannot be reproduced on v29.A secondary problem in the same codeunit:
WorkDate()was modified before theGenerate()calls and only restored at the very end of the procedure. If any call threw an error,WorkDatewas left permanently modified for the rest of the session. This is the secondary fix in PR microsoft/ALAppExtensions#30006.Since the main crash is already resolved in v29, the PR addresses the remaining WorkDate state leak, which could still affect any environment where the obsolete codeunit is invoked directly.
SchulzOli commentedon May 5, 2026
thanks a lot for your answer and the provided informations.
jeffreybulanadi commentedon May 5, 2026
Oliver Schulz (@SchulzOli) no worries, mate. let's wait for the reviewer to review my code.
JesperSchulz commentedon Jun 22, 2026
Transferring this issue to BCApps. Repo migration to BCApps will complete next Monday. Jeffrey Bulanadi (@jeffreybulanadi), could you recreate the PR here when the repo migration is complete, please?
JesperSchulz commentedon Jun 22, 2026
🤖 AI triage completed. Product group, please validate the triage report (Microsoft internal access only, use Ctrl+Click to open in new tab).
Was this triage helpful? React with 👍 or 👎 on this comment to provide feedback.
Aleyenda commentedon Aug 26, 2026
ventselartur can you take a look at the latest comments?