Describe the bug
A table field of type enum cannot have an InitialValue
To Reproduce
Given: enum with some members. a table with a field referencing the enum.
Add property InitValue to the table field
AL Code to reproduce the issue

Expected behavior
Works like it did since resolution of #4192
Screenshots
5. Versions:
While you are at it, can you please also add intellisense for choosing all available Enum values?

(The screenshot is from AL Language 5.0.320540, where the assignment still works.)
Hi @RafaelKoch,
Can you provide a complete simple example since I am not able to reproduce the issue.
Thanks.
However I was able to reproduce the issue @NKarolak highlights and can confirm that is solved in a future release.
Hi @thpeder ,
we found the way to make it work, and accidentally maybe also the reason You could not repro: The enum value is called Warning and the InitValue was assigned like this: InitValue = Warning. This solution used to compile just fine in v15 and v16.
Now somehow the value has to be set that way InitValue = "Warning"
So most likely the word Warningis ambiguous now. So forget about this aspect, but check if Intellisense will put it in correctly :-)
Thanks @RafaelKoch, You found the issue.
When the value is a keyword then it can't be used without quotes and unfortunately we have a bug where intellisense doesn't add them.
I'll mark it as a bug
enum 50100 MyEnum
{
value(3; Warning) { }
value(4; if) { }
}
table 50100 MyTable
{
fields
{
field(2; EnumField; Enum MyEnum)
{
InitValue = ^;
}
}
}
Most helpful comment
Thanks @RafaelKoch, You found the issue.
When the value is a keyword then it can't be used without quotes and unfortunately we have a bug where intellisense doesn't add them.
I'll mark it as a bug