1. Describe the bug
Since BC 26 / runtime 15.2, an implicit conversion between Record and RecordRef is supported.
The compiler now allows us also to assign a (record based) variant to RecRef:
RecRef := SomeVariant;
But this will result in a runtime error:
The expression Microsoft.Dynamics.Nav.Runtime.NavIndirectValue cannot be type-converted to a Microsoft.Dynamics.Nav.Runtime.NavRecordRef value.
2. To Reproduce
Steps to reproduce the behavior:
Add assignment like RecRef := SomeVariant;.
Then run the code in the web client.
3. Expected behavior
Error in the AL compiler for the RecRef := SomeVariant; line, no publish possible.
4. Actual behavior
Error in the web client, which is too late.
5. Versions:
- AL Language: v17.0.2273547
- Business Central: 27.1
1. Describe the bug
Since BC 26 / runtime 15.2, an implicit conversion between Record and RecordRef is supported.
The compiler now allows us also to assign a (record based) variant to RecRef:
RecRef := SomeVariant;But this will result in a runtime error:
The expression Microsoft.Dynamics.Nav.Runtime.NavIndirectValue cannot be type-converted to a Microsoft.Dynamics.Nav.Runtime.NavRecordRef value.2. To Reproduce
Steps to reproduce the behavior:
Add assignment like
RecRef := SomeVariant;.Then run the code in the web client.
3. Expected behavior
Error in the AL compiler for the
RecRef := SomeVariant;line, no publish possible.4. Actual behavior
Error in the web client, which is too late.
5. Versions: