Skip to content

[Use of Option Access syntax in formulas] - SubPageLink with Provider does not allow it #21403

@Duizy1971

Description

@Duizy1971

In AL 10.0 the use of option access syntax in formulas was introduced. It does not work in all cases yet, not even in 10.1.
We have a feature on for instance a sales order page extension that shows in two factboxes either the sales header or the line comments for a particular page.
The AL compiler recognizes the translation of 42 to Page::"Sales Order" on the SubPageLink of the HeaderCommentLines but fails on the same property on the LineCommentLines. Probably has something to do with the use of the Provider property.

    addafter(Control1900316107)
    {
        part(HeaderCommentLinesA105; "A105 Sales Doc. Comment Factb")
        {
            ApplicationArea = Basic, Suite;
            Caption = 'Header Comment Lines';
            ShowFilter = false;
            SubPageLink = "Document Type" = field("Document Type"),
                          "No." = field("No."),
                          "Document Line No." = const(0),
                          "Line No." = const(Page::"Sales Order");
        }
    }
    addafter(Control1907234507)
    {
        part(LineCommentLinesA105; "A105 Sales Doc. Comment Factb")
        {
            ApplicationArea = Basic, Suite;
            Caption = 'Line Comment Lines';
            Provider = SalesLines;
            ShowFilter = false;
            SubPageLink = "Document Type" = field("Document Type"),
                          "No." = field("Document No."),
                          "Document Line No." = field("Line No."),
                          "Line No." = const(42);
            SubPageView = where("Document Line No." = filter(<> 0));
        }
    }

image_10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions