BusinessCentral.LinterCop
BusinessCentral.LinterCop copied to clipboard
LC0027: Handle on Variant as Table, with Supported Page
Extend the LC0027 rule to also raise a diagnostic in case when a Variant is passed in combination with a Page which is supported by the Page Management codeunit.
Example
local procedure HandleError(MyErrorInfo: ErrorInfo)
var
RecRelatedVariant: Variant;
begin
RecRelatedVariant := MyErrorInfo.RecordId.GetRecord();
case MyErrorInfo.TableId of
Database::Resource:
Page.Run(Page::"Employee Card", RecRelatedVariant);
end;
end;