Runtime Error when using a Record variable as a dynamic expression for an action or a page field property
I'm hoping to get #6992 fixed this time.
1. Describe the bug
Missing warning or error when assigning a record variable (other than Rec!) for a page field or action property, mainly Enabled and Editable. This leads to a BC runtime error message later.
2. To Reproduce For actions: see #6992 .
For page fields:
On a page, define a global record variable GlobalRecVar.
Then add the Editable property to some field:
field(SomeField; Rec.SomeField)
{
Editable = GlobalRecVar.SomeOtherField;
}
3. Expected behavior A warning or error should be raised.
4. Actual behavior No warning or error. When the code is published and the page is run on the client, a runtime error will occur:
The identifier 'GlobalRecVar.SomeOtherField' could not be found.
This should be prevented.
5. Versions:
- AL Language: v13.1.1065068
I know I'm the one who closed the previous issue as something that we're not prioritizing then, but now I'm wondering if the issue isn't that we're missing a compiler error - but that there is a runtime crash to begin with. I'll bring this up internally again.