waldo1001 / crs-al-language-extension

Make working with the (Dynamics NAV / 365) AL Language easier and more efficient.
MIT License
34 stars 42 forks source link

[Improvement] Support Arrays on page Extenions #260

Open pri-kise opened 2 years ago

pri-kise commented 2 years ago

Support adding a prefix for Fields with arrays as value: e.g. for Dimensions.

field(ShortcutDimCode3; ShortcutDimCode[3])
                    {
                        ApplicationArea = Dimensions;
                        CaptionClass = '1,2,3';
                        TableRelation = "Dimension Value".Code WHERE("Global Dimension No." = CONST(3),
                                                                    "Dimension Value Type" = CONST(Standard),
                                                                    Blocked = CONST(false));
                        Visible = DimVisible3;

                        trigger OnValidate()
                        begin
                            ValidateShortcutDimension(3);
                        end;
                    }
                    field(ShortcutDimCode4; ShortcutDimCode[4])
                    {
                        ApplicationArea = Dimensions;
                        CaptionClass = '1,2,4';
                        TableRelation = "Dimension Value".Code WHERE("Global Dimension No." = CONST(4),
                                                                    "Dimension Value Type" = CONST(Standard),
                                                                    Blocked = CONST(false));
                        Visible = DimVisible4;

                        trigger OnValidate()
                        begin
                            ValidateShortcutDimension(4);
                        end;
                    }