Try Microsoft Edge
A fast and secure browser that's designed for Windows 10
I have created extension of base enum EcoResCategoryNamedHierarchyRole, then I create new enum value. After DB synchronization this new value has integer value still zero. This issue is in UAT environment.
Where do you look for the value? Elements of extensible enums don't have Value property.
I have created runnable job, which enumerates all values and names.
Can you first check the values in EnumValueTable (using SSMS)? Then we can discuss your code, if it shows something else (and you share your code with us).
When enum values of extensible enums are synchronized, the integer values of the baseline enum are deterministic, whereas the integer values of the extension enum values are non-deterministic. The values are generated during synchronization. Therefore, you can't have logic that depends on the integer value of the enum values.
Please refer: docs.microsoft.com/.../add-enum-value
In this table is integer value of my enum value zero, too. I do not use enums as integar in my code. This is my code: EcoResCategoryHierarchyRole::getHierarchiesByRole(EcoResCategoryNamedHierarchyRole::CommodityGroupHierarchy).CategoryHierarchy, method getHierarchiesByRole returns null common, because in the beginning of this is method is verification if variable is set.
Okay, I see your point now. In my opinion, this is a bug in getHierarchiesByRole(), because 0 is a valid value of the enum.
You could meddle with the ID in UAT, but it would fix the problem in production. I think you need to get the bug fixed.
Thank you, I have created Issue on LCS
Business Applications communities