web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Dynamics Business Central GST Use case setup

(3) ShareShare
ReportReport
Posted on by 84

Hello Experts,

I have extended the Sales Document Type enum by adding a new value, Proforma Document (Value: 50XXX).

I now want the Tax Engine to calculate tax for this new document type as well.

What I have tried

1. Adding the new document type as a constant in the Use Case Condition

I added the new document type as a constant in the Use Case Condition, but the use case is not executed.

 
 

2. Using a Tax Attribute

I then created a new Tax Attribute based on the Sales Document Type, mapped it to the Sales Line, and used that attribute in the Use Case Condition.



However, this results in the error shown below.

Investigation

From the code, I found that Codeunit 20293 "Use Case Execution" acts as the gatekeeper for use case execution.

  • Extension: Microsoft_Tax Engine_27.8.50894.0.app
  • Codeunit: 20293 "Use Case Execution"
  • Procedure: ExecuteUseCase()

The CanExecuteUseCase procedure evaluates all use case conditions before executing the use case. Therefore, the condition for Sales Document Type must evaluate to true for my new enum value.


Has anyone implemented a similar scenario or knows the correct approach to support an extended Sales Document Type in Tax Engine use case conditions?

Any guidance or recommended setup would be appreciated.

I have the same question (0)
  • Suggested answer
    OussamaSabbouh Profile Picture
    19,052 Super User 2026 Season 2 on at
    Hello,
    Extending the Sales Document Type enum alone does not automatically make the new value part of the existing Tax Engine use-case configuration. Based on your error, the Tax Attribute exists as a condition symbol, but its value is not being populated into TempSymbols, so the condition cannot be evaluated. The recommended approach is to create the custom Tax Attribute, map it to the relevant Sales Line/Sales Header Document Type field in the use case's Attribute Mapping, and then use that mapped attribute in the condition. Simply adding the attribute to the condition is not enough. I would avoid changing Codeunit 20293 "Use Case Execution" directly; if the attribute is correctly mapped but the custom enum value is still not recognized, then a small extension may be required to provide the custom symbol/value because Microsoft does not document automatic support for enum-extension values in existing Tax Engine use-case symbols.
    Regards,
    Oussama Sabbouh
  • Manish Sharma Profile Picture
    146 on at
    Is this proforma invoice functionality only for printing purpose? can you share more details.
     
  • Suggested answer
    Grigorios Mavrogeorgis Profile Picture
    3,191 Super User 2026 Season 2 on at

    Hi, that error means the engine didn't find attribute 41 in its runtime script symbol collection, and those symbols get built from the attributes of the tax type that the use case belongs to. So I'd check first whether attribute 41 really sits under the GST tax type, whether it's part of the use case version you have released, and whether the field mapping is correct. If it hangs under another tax type the script will never see it.

    On the values, for an option attribute mapped to a reference field BC does populate them from the field's option string when that field is validated. But you extended the enum after the attribute already existed, so the stored values could be stale. Worth opening the value list and revalidating the field, not saying that's the cause, just easy to rule out.

    Bigger thing, the GST subscribers work on the standard document types, so posting and GST entries won't follow a new one. 

     

    Glad to help - follow up if anything is unclear.   

    ►  If this solved it, marking it verified helps others too.       

    Regards,
    Grigorios Mavrogeorgis
    Business Central Consultant & AL Developer

    Work: Gmsoft Limited
    Blog:  insidebusinesscentral
    LinkedIn: linkedin.com/in/gregorymavrogeorgis

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 572 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 331 Super User 2026 Season 2

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 330 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans