Describe the bug
As soon as the directive #pragma implicitwith disable is enabled on a page, SubPageLink properties are not working anymore if link of type field is used.
To Reproduce
Steps and to reproduce the behavior:
#pragma implicitwith disable
page 50000 "My Integer Page"
{
PageType = List;
UsageCategory = Lists;
ApplicationArea = All;
SourceTable = Integer;
layout
{
area(Content)
{
field(Number; Rec.Number)
{
ApplicationArea = All;
}
}
area(Factboxes)
{
part(MyFactbox; "My Factbox")
{
ApplicationArea = All;
SubPageLink = "Number" = field(Number);
}
}
}
}
page 50001 "My Factbox"
{
SourceTable = Integer;
PageType = CardPart;
layout
{
area(Content)
{
field(Number; Rec.Number)
{
ApplicationArea = All;
}
}
}
}
#pragma implicitwith restore
... If let the code as is, you get the following error about line SubPageLink = "Number" = field(Number);:
error AL0118: The name 'Number' does not exist in the current context
If you try to fix the SubPageLink that way:
SubPageLink = "Number" = field(Rec.Number);
you get this error:
error AL0104: Syntax error, ')' expected
Expected behavior
I do not know :) but we should have way to make it works.
Screenshots
./.
5. Versions:
also reported as part of https://github.com/microsoft/AL/issues/5916
Most helpful comment
also reported as part of https://github.com/microsoft/AL/issues/5916