Describe the issue
[Bug]: "Object Type" option on virtual table "Application Object Metadata" — OptionMembers off-by-one vs OptionCaption / NavObjectType
Describe the issue
On the system virtual table Application Object Metadata (2000000071), the Object Type Option field has OptionCaption and OptionMembers out of sync.
-OptionCaption is correct and aligned with the platform NavObjectType values;
-OptionMembers is missing one separator between EnumExtension and PermissionSet (,,, in the caption vs ,, in the members).
Every member from PermissionSet onward is therefore shifted down by one ordinal when referenced in AL.
Resolved ordinals:
| Member |
OptionMembers (current) |
OptionCaption / NavObjectType (correct) |
| PermissionSet |
19 |
20 |
| PermissionSetExtension |
20 |
21 |
| ReportExtension |
21 |
22 |
Impact
Stored data uses the real NavObjectType values, so AL code that references these members by name resolves to the wrong integer:
SetRange("Object Type", "Object Type"::ReportExtension) filters on 21 → returns PermissionSetExtension records and never matches actual ReportExtension objects.
::PermissionSetExtension resolves to 20 → matches PermissionSet.
::PermissionSet resolves to 19 → matches an unused slot.
Expected: "Object Type"::ReportExtension = 22
Actual: "Object Type"::ReportExtension = 21
Suggested fix
Add one comma before "PermissionSet" in OptionMembers so it matches OptionCaption.
field(3; "Object Type"; Option)
{
Caption = 'Object Type';
OptionCaption = ',Table,,Report,,Codeunit,XMLport,MenuSuite,Page,Query,,,,,PageExtension,TableExtension,Enum,EnumExtension,,,PermissionSet,PermissionSetExtension,ReportExtension';
OptionMembers = ,"Table",,"Report",,"Codeunit","XMLport",MenuSuite,"Page","Query",,,,,"PageExtension","TableExtension","Enum","EnumExtension",,,"PermissionSet","PermissionSetExtension","ReportExtension";
}
Expected behavior
Expected: "Object Type"::ReportExtension = 22
Actual: "Object Type"::ReportExtension = 21
Steps to reproduce
"Application Object Metadata".SetRange("Object Type", "Object Type"::ReportExtension) filters on 21 → returns PermissionSetExtension records and never matches actual ReportExtension objects.
Additional context
No response
I will provide a fix for a bug
Describe the issue
[Bug]: "Object Type" option on virtual table "Application Object Metadata" — OptionMembers off-by-one vs OptionCaption / NavObjectType
Describe the issue
On the system virtual table Application Object Metadata (2000000071), the
Object TypeOption field hasOptionCaptionandOptionMembersout of sync.-
OptionCaptionis correct and aligned with the platformNavObjectTypevalues;-
OptionMembersis missing one separator betweenEnumExtensionandPermissionSet(,,,in the caption vs,,in the members).Every member from
PermissionSetonward is therefore shifted down by one ordinal when referenced in AL.Resolved ordinals:
Impact
Stored data uses the real
NavObjectTypevalues, so AL code that references these members by name resolves to the wrong integer:SetRange("Object Type", "Object Type"::ReportExtension)filters on21→ returns PermissionSetExtension records and never matches actual ReportExtension objects.::PermissionSetExtensionresolves to20→ matches PermissionSet.::PermissionSetresolves to19→ matches an unused slot.Expected:
"Object Type"::ReportExtension= 22Actual:
"Object Type"::ReportExtension= 21Suggested fix
Add one comma before
"PermissionSet"inOptionMembersso it matchesOptionCaption.Expected behavior
Expected:
"Object Type"::ReportExtension= 22Actual:
"Object Type"::ReportExtension= 21Steps to reproduce
"Application Object Metadata".
SetRange("Object Type", "Object Type"::ReportExtension)filters on21→ returns PermissionSetExtension records and never matches actual ReportExtension objects.Additional context
No response
I will provide a fix for a bug