Enum literals on fixed relations and why could you not see an enum lookup?
Views (629)
Hello AX World,
Today I have discovered that I can use enum literals in fixed table relations. Yay!
It even respects the package scope.
Notice that Application Suite extends Case Management enum HierarchyType.
Perfect. I want to use it right away.
Without further ado, I will show you what was wrong and will explain how I probably ended up in this situation.
The problem was that the enum field was missing an Enum Type property...
...even thou the EDT had it.
It is definitely a great feature, so consider using it ;)
Be aware and take care!
Today I have discovered that I can use enum literals in fixed table relations. Yay!
It even respects the package scope.
Notice that Application Suite extends Case Management enum HierarchyType.
Perfect. I want to use it right away.
Problem
So I have created a relation and was heading to use it. Wait! Where is the lookup? Why cannot I see it? Can I type enum literal in? No. It gives a compilation error.Without further ado, I will show you what was wrong and will explain how I probably ended up in this situation.
The problem was that the enum field was missing an Enum Type property...
...even thou the EDT had it.
Cause
The reason was that I have created a table field with incorrect enum EDT. And fixing the enum EDT did not fix the table field.
This is the way I reproduced it:
1. Created an enum EDT type and did not set Extends or Enum Type property.
2. Created a field of this type in a table.
Now I have an enum field without Enum Type property set.
Now I have an enum field without Enum Type property set.
Solution
Once you select Extended Data Type, you cannot edit this property . To solve the problem, clear Extended Data Type property and type it again.Now you see the lookup in the relations.
Be aware and take care!
This was originally posted here.
*This post is locked for comments