Skip to content

Conversation

@tuan-nguyen-fenwick
Copy link
Contributor

@tuan-nguyen-fenwick tuan-nguyen-fenwick commented Oct 28, 2025

Change log:

W1 Demo Data > Analytics Module

  • Salespersons: Spread sales documents across more salespeople.
  • Open orders: Added more open sales orders.
  • Back orders: Added more sales backorders.
  • Discounts: Added line discounts to posted sales invoices.

IT (Italian version) Demo Data

  • Payment Terms: Updated payment term setup for Payment Terms 2D, 10D, 30D and 60D. This change is required to post sales documents in the W1 Analytics module.

Fixes: #29346
Fixes AB#597341

Tuan Nguyen added 30 commits June 26, 2025 15:20
@JesperSchulz JesperSchulz self-assigned this Dec 5, 2025
@JesperSchulz JesperSchulz added the processing-PR The PR is currently being reviewed label Dec 5, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

Processing this PR. The branch is now locked 🔒 Please don't push updates unless otherwise agreed.

@JesperSchulz
Copy link
Contributor

Internal build fails with:

The Deferral Account field must have a value (Cannot be null or empty) in the Deferral Template table: Deferral Code=3M.
--------------------- CorrelationId: 4776659f-db73-4960-a81d-8103617d6223. Status: 400 (The Deferral Account field must have the value (Must not
--------------------- be zero or empty) in the Deferral Template table: Deferral Code=3M.) ErrorCode:
--------------------- Application_FieldValidationException Content: {"error":{"code":"Application_FieldValidationException","message":"Field
--------------------- Deferral Account must have a value (Must not be zero or equal to 9) in the Deferral table
--------------------- Template: Deferral Code=3M. CorrelationId: 4776659f-db73-4960-a81d-8103617d6223."}} Headers: Server:
--------------------- Microsoft-HTTPAPI/2.0 request-id: 4776659f-db73-4960-a81d-8103617d6223 WWW-Authenticate: Negotiate
--------------------- oRswGaADCgEAoxIEEEAEAAACsbVcwBqovOQAAAAAA= Date: Fri, 05 Dec 2025 12:44:54 GMT Content-Type: application/json
--------------------- Content-Length: 270

@tuan-nguyen-fenwick
Copy link
Contributor Author

Internal build fails with:

The Deferral Account field must have a value (Cannot be null or empty) in the Deferral Template table: Deferral Code=3M.
--------------------- CorrelationId: 4776659f-db73-4960-a81d-8103617d6223. Status: 400 (The Deferral Account field must have the value (Must not
--------------------- be zero or empty) in the Deferral Template table: Deferral Code=3M.) ErrorCode:
--------------------- Application_FieldValidationException Content: {"error":{"code":"Application_FieldValidationException","message":"Field
--------------------- Deferral Account must have a value (Must not be zero or equal to 9) in the Deferral table
--------------------- Template: Deferral Code=3M. CorrelationId: 4776659f-db73-4960-a81d-8103617d6223."}} Headers: Server:
--------------------- Microsoft-HTTPAPI/2.0 request-id: 4776659f-db73-4960-a81d-8103617d6223 WWW-Authenticate: Negotiate
--------------------- oRswGaADCgEAoxIEEEAEAAACsbVcwBqovOQAAAAAA= Date: Fri, 05 Dec 2025 12:44:54 GMT Content-Type: application/json
--------------------- Content-Length: 270

Hi @JesperSchulz

It would be great if you could provide a call stack for me to further investigate.

As far as I know, I was able to generate demo data normally in my BC environment. I checked and even got some sales invoice lines posted with deferral codes in the database. My platform build is US Business Central 28.0 (Platform 28.0.40012.0 + Application 28.0.40329.0).

image

And the Deferral Template records are created successfully.
image

Here is the link to the code that creates and populates the Deferral Template with a deferral account:
https://github.com/microsoft/ALAppExtensions/blob/main/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/1.Setup%20data/CreateDeferralTemplate.Codeunit.al

@JesperSchulz
Copy link
Contributor

The build output was a little strange. Let me try to rerun. If it fails again, I'll try to dig for more details.

@tuan-nguyen-fenwick
Copy link
Contributor Author

tuan-nguyen-fenwick commented Dec 16, 2025

The build output was a little strange. Let me try to rerun. If it fails again, I'll try to dig for more details.

@JesperSchulz Do you have any update on this?

@JesperSchulz
Copy link
Contributor

The build output was a little strange. Let me try to rerun. If it fails again, I'll try to dig for more details.

@JesperSchulz Do you have any update on this?

Unfortunately it failed again. However, it fails on the "BuildDatabase" task, which is a little unusual. And it only seems to be failing in local versions! The W1 database builds, but all local versions fail:

[2025-12-12 15:41:18] Initialize CRONUS International Ltd.. Language ID 2067
Invoking codeunit '2' on tenant '' on server 'NAV_BE'.
[2025-12-12 15:41:23] Run and generate full Contoso demo data.
Invoking codeunit '5193' on tenant '' on server 'NAV_BE'.
[2025-12-12 15:42:49] Inner exception:
[2025-12-12 15:42:49] Invoke-jobNAVCodeunit: Deferral Account moet een waarde hebben in Deferral Template: Deferral Code=3M. Het veld kan niet nul of leeg zijn. 
--------------------- CorrelationId:  e8e833e1-1ddd-4b98-b72e-62f53fa6c9f9. Status: 400 (Deferral Account moet een waarde hebben in Deferral
--------------------- Template: Deferral Code=3M. Het veld kan niet nul of leeg zijn.) ErrorCode: Application_FieldValidationException 
--------------------- Content: {"error":{"code":"Application_FieldValidationException","message":"Deferral Account moet een waarde hebben in
--------------------- Deferral Template: Deferral Code=3M. Het veld kan niet nul of leeg zijn.  CorrelationId: 
--------------------- e8e833e1-1ddd-4b98-b72e-62f53fa6c9f9."}}  Headers: Server: Microsoft-HTTPAPI/2.0 request-id:
--------------------- e8e833e1-1ddd-4b98-b72e-62f53fa6c9f9 WWW-Authenticate: Negotiate oRswGaADCgEAoxIEEAEAAADUMbvR6aqemgAAAAA= Date: Fri, 12
--------------------- Dec 2025 14:42:33 GMT Content-Type: application/json Content-Length: 240

I'm afraid I don't have time to investigate further. We will need someone from the SCM team to look into this, if needed. @PredragMaricic, FYI.

@tuan-nguyen-fenwick
Copy link
Contributor Author

tuan-nguyen-fenwick commented Dec 17, 2025

Unfortunately it failed again. However, it fails on the "BuildDatabase" task, which is a little unusual. And it only seems to be failing in local versions! The W1 database builds, but all local versions fail:

[2025-12-12 15:41:18] Initialize CRONUS International Ltd.. Language ID 2067
Invoking codeunit '2' on tenant '' on server 'NAV_BE'.
[2025-12-12 15:41:23] Run and generate full Contoso demo data.
Invoking codeunit '5193' on tenant '' on server 'NAV_BE'.
[2025-12-12 15:42:49] Inner exception:
[2025-12-12 15:42:49] Invoke-jobNAVCodeunit: Deferral Account moet een waarde hebben in Deferral Template: Deferral Code=3M. Het veld kan niet nul of leeg zijn. 
--------------------- CorrelationId:  e8e833e1-1ddd-4b98-b72e-62f53fa6c9f9. Status: 400 (Deferral Account moet een waarde hebben in Deferral
--------------------- Template: Deferral Code=3M. Het veld kan niet nul of leeg zijn.) ErrorCode: Application_FieldValidationException 
--------------------- Content: {"error":{"code":"Application_FieldValidationException","message":"Deferral Account moet een waarde hebben in
--------------------- Deferral Template: Deferral Code=3M. Het veld kan niet nul of leeg zijn.  CorrelationId: 
--------------------- e8e833e1-1ddd-4b98-b72e-62f53fa6c9f9."}}  Headers: Server: Microsoft-HTTPAPI/2.0 request-id:
--------------------- e8e833e1-1ddd-4b98-b72e-62f53fa6c9f9 WWW-Authenticate: Negotiate oRswGaADCgEAoxIEEAEAAADUMbvR6aqemgAAAAA= Date: Fri, 12
--------------------- Dec 2025 14:42:33 GMT Content-Type: application/json Content-Length: 240

I'm afraid I don't have time to investigate further. We will need someone from the SCM team to look into this, if needed. @PredragMaricic, FYI.

@JesperSchulz Thanks, I think this error message is much clearer now. I'll further investigate from my end.

@tuan-nguyen-fenwick
Copy link
Contributor Author

@KennieNP
After reviewing the build errors, adding deferral codes to posted and unposted sales documents are causing more problems than it's worth since deferral income accounts aren’t the same across regions. Is it okay if I remove this requirement?

@KennieNP
Copy link

KennieNP commented Jan 2, 2026 via email

@tuan-nguyen-fenwick
Copy link
Contributor Author

Thanks for confirming, that's good point. I think sales deferral can be in its own work item.

@tuan-nguyen-fenwick
Copy link
Contributor Author

@PredragMaricic can you help me rerun the build database please?

@JesperSchulz
Copy link
Contributor

@PredragMaricic can you help me rerun the build database please?

I'm on it :-)

@JesperSchulz
Copy link
Contributor

Following BuildDatabase tasks are now failing: ES, IT.

E.g. for ES:

�[31;1mInvoke-jobNAVCodeunit: �[31;1mPayment Method Code debe tener un valor en Purchase Header: Document Type=Order, No.=106009. No puede ser cero ni estar�[0m
�[31;1m�[31;1mvacío.  CorrelationId:  269cdc4d-c7d4-42c0-9fd0-bb5832ba7cd0. Status: 400 (Payment Method Code debe tener un valor en�[0m
�[31;1m�[31;1mPurchase Header: Document Type=Order, No.=106009. No puede ser cero ni estar vacío.) ErrorCode:�[0m
�[31;1m�[31;1mApplication_FieldValidationException  Content:�[0m
�[31;1m�[31;1m{"error":{"code":"Application_FieldValidationException","message":"Payment Method Code debe tener un valor en Purchase�[0m
�[31;1m�[31;1mHeader: Document Type=Order, No.=106009. No puede ser cero ni estar vac\u00edo.  CorrelationId: �[0m
�[31;1m�[31;1m269cdc4d-c7d4-42c0-9fd0-bb5832ba7cd0."}}  Headers: Server: Microsoft-HTTPAPI/2.0 request-id:�[0m
�[31;1m�[31;1m269cdc4d-c7d4-42c0-9fd0-bb5832ba7cd0 WWW-Authenticate: Negotiate oRswGaADCgEAoxIEEAEAAADZvuf8ZzB8UgAAAAA= Date: Fri, 09�[0m
�[31;1m�[31;1mJan 2026 10:52:08 GMT Content-Type: application/json Content-Length: 256�[0m
BuildCop : warning : BC00030 : An MSBuild failure, user or configuration error has been detected (return code 1). See BuildCop.log for details. BuildCop will attempt to perform an analysis of the failed build.

@tuan-nguyen-fenwick
Copy link
Contributor Author

tuan-nguyen-fenwick commented Jan 13, 2026

@JesperSchulz I've updated, tested and confirmed the fixes in ES and IT builds.

Version: Business Central 28.0 (Platform 28.0.44304.0 + Application 28.0.44440.0)

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

processing-PR The PR is currently being reviewed SCM GitHub request for SCM area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve analytics sales dataset in Demo Data Tool

6 participants