Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime Error when using a Record variable as a dynamic expression for an action or a page field property #7849

Open
NKarolak opened this issue Sep 6, 2024 · 1 comment

Comments

@NKarolak
Copy link

NKarolak commented Sep 6, 2024

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
@NKarolak NKarolak changed the title Runtime Error when use a Record variable as a dynamic expression for page field property Runtime Error when using a Record variable as a dynamic expression for page/action field property Sep 6, 2024
@NKarolak NKarolak changed the title Runtime Error when using a Record variable as a dynamic expression for page/action field property Runtime Error when using a Record variable as a dynamic expression for an action or a page field property Sep 6, 2024
@thloke
Copy link
Contributor

thloke commented Sep 10, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants