microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
747 stars 245 forks source link

AA0248 in Pageextensions not working as expected #7867

Open stephanweidmann opened 1 month ago

stephanweidmann commented 1 month ago

1. Describe the bug AA0248 is shown hidden with 3 dots for a variable, but if you follow the instructions and add the this, AL0847 occurres (Page MainPage does not contain a definition for variable) 2. To Reproduce 1) Create a page extension with a variable of type boolean, and add a field with enabled = Variable. Image

pageextension 74791 "KVSDMSADVDemo" extends "Company Information" { layout { addfirst(General) { field(KVSDMSADVPREBaseCalendarCode; Rec."Base Calendar Code") { ApplicationArea = All; Visible = Variable; Enabled = this.Variable; } } }

var
    Variable: Boolean;

trigger OnOpenPage()
begin
    Variable := false
end;

}

3. Expected behavior No (hidden) warning, or this for pageextension variable

4. Actual behavior Wrong warning, or unsupported this in pageextension

5. Versions:

Final Checklist

Please remember to do the following:

TKapitan commented 2 weeks ago

The same problem happens in tableextension in combination with local procedures/global variables on the tableextension level.