Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LC0027: Handle on Variant as Table, with Supported Page #699

Open
Arthurvdv opened this issue Jul 12, 2024 · 0 comments
Open

LC0027: Handle on Variant as Table, with Supported Page #699

Arthurvdv opened this issue Jul 12, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Arthurvdv
Copy link
Collaborator

Arthurvdv commented Jul 12, 2024

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;
@Arthurvdv Arthurvdv added the enhancement New feature or request label Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant