Al: Warning 'with' will be removed in the future

Created on 2 Oct 2020  路  4Comments  路  Source: microsoft/AL

Hi.

In my code the following warning has started to appear

Screenshot_1

However, if I fix it by putting Rec.

Screenshot_2

When executing I get the following error

Screenshot_3

I have seen this happen in the Enabled, Editable, .... properties of the pages

A greeting

bug

Most helpful comment

True they are all duplicates. As far as I know it is fixed in our master, thus it just need to be backported.

All 4 comments

We had the same problems. Best to use a global boolean which u set in the trigger OnAfterGetCurrentRecord() and then set the boolean there.
This will make the page run for both BC17 and previous.

True they are all duplicates. As far as I know it is fixed in our master, thus it just need to be backported.

The AL604 warning (and hence the code fixer) will in not show for runtime < 6.0 from the next CU. The previous runtimes doesn't support the Rec. in client side expression.

Was this page helpful?
0 / 5 - 0 ratings