You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Describe the bug
When using "AddLoadFields" after "SetLoadFields" the warning AA0242 will be thrown when the additionally added field is used.
See screenshot:
I can't tell atm if this is by design or a bug - because you can also use AddLoadFields before SetLoadFields, which means SetLoadFields would overwrite the selected fields from AddLoadFields (for my understanding).
2. To Reproduce
See screenshot above
Code:
localprocedure Foo()var
ServiceItem: Record "Service Item";
begin
ServiceItem.Reset();
ServiceItem.SetLoadFields(Priority);
ServiceItem.AddLoadFields(Description);
ifnot ServiceItem.FindSet() thenexit;
repeat
Message(Format(ServiceItem.Priority));
Message(ServiceItem.Description);
until ServiceItem.Next() = 0;
end;
3. Expected behavior
AA0242 will not be thrown for line "Message(ServiceItem.Description);" as ServiceItem.Description got loaded
4. Actual behavior
AA0242 is thrown for line "Message(ServiceItem.Description);"
5. Versions:
AL Language: v14.1.1180850
Visual Studio Code: 1.95.3 (user setup)
Business Central: 25.1
List of Visual Studio Code extensions that you have installed:
AZ AL Dev Tools/AL Code Outline
BusinessCentral.LinterCop
NAB AL Tools
Operating System:
[ X ] Windows
Linux
MacOS
Final Checklist
Please remember to do the following:
[ X ] Search the issue repository to ensure you are reporting a new issue
[ X ] Reproduce the issue after disabling all extensions except the AL Language extension
[ X ] Simplify your code around the issue to better isolate the problem
1. Describe the bug
When using "AddLoadFields" after "SetLoadFields" the warning AA0242 will be thrown when the additionally added field is used.
See screenshot:
I can't tell atm if this is by design or a bug - because you can also use AddLoadFields before SetLoadFields, which means SetLoadFields would overwrite the selected fields from AddLoadFields (for my understanding).
2. To Reproduce
See screenshot above
Code:
3. Expected behavior
AA0242 will not be thrown for line "Message(ServiceItem.Description);" as ServiceItem.Description got loaded
4. Actual behavior
AA0242 is thrown for line "Message(ServiceItem.Description);"
5. Versions:
Final Checklist
Please remember to do the following:
[ X ] Search the issue repository to ensure you are reporting a new issue
[ X ] Reproduce the issue after disabling all extensions except the AL Language extension
[ X ] Simplify your code around the issue to better isolate the problem
Internal work item: AB#560485
The text was updated successfully, but these errors were encountered: