Extending “Sales Line Type” enum in Business Central 16.0
azharsaeedkhan
Member Posts: 37
i am working on BC version 16.0, as in BC 16.0 option field is replaced with enum, as you can see here (
) that i am extending a "Sales Line Type" enum and adding a new value to it. But when i inspect the "Sale Line" table it is showing that the field Type is option and not an enum (
). So the value i have added to enum is not displayed.
How can i extend "Sales Line Type"? am i doing something wrong?

) that i am extending a "Sales Line Type" enum and adding a new value to it. But when i inspect the "Sale Line" table it is showing that the field Type is option and not an enum (

). So the value i have added to enum is not displayed.
How can i extend "Sales Line Type"? am i doing something wrong?
0
Best Answer
-
@DenSter this should be reported to microsoft on github.
but for now i have found a workaround, by going through the standard code i have found this
the tooltip text i was looking at was not of the field Type but of the field FilteredTypeField, so this inspired me do the following changes in the pageextension
and boom, it worked out
0
Answers
-
@Juhl sorry about that i was supposed to share the other screenshot (Updated now).
But it doesn't work like that, i have added multiple values in the range >=50000 but no success.0 -
That is supposed to work. The enum is extensible, and it looks like you are extending it correctly. I just tried in a new sandbox container and it is also not showing up for me. Maybe what is missing is the additional tablerelationship. You're adding a value to the enum, maybe BC is expecting an explicit tablerelationship for that value. See here for an example: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-extensible-enums
If you can't make it work with an additional table relationship, I would submit an issue in GitHub0 -
0
-
@DenSter this should be reported to microsoft on github.
but for now i have found a workaround, by going through the standard code i have found this
the tooltip text i was looking at was not of the field Type but of the field FilteredTypeField, so this inspired me do the following changes in the pageextension
and boom, it worked out
0 -
Glad you were able to make that work, and thanks for posting your solution. I had also tried adding the tablerelationship and found that it didnt fix it for me either
You can report the issue yourself here: https://github.com/microsoft/AL/issues1
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 324 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
