modal-dsl / modal

A Domain Specific Language for AL Extension Development
Apache License 2.0
16 stars 4 forks source link

Short names #20

Closed waldo1001 closed 3 years ago

waldo1001 commented 3 years ago

When I would use short names for documents like this: image it gives me compile errors: image Full mdal:

solution "Name" {
    Prefix = "PRE";

    master "Container" {
        ShortName = "Cont.";

        fields {
            template("Name"; Name)            
            template("Dimension"; Dimensions)
        }
        cardPage {
            group("General") {
                field("Name")
            }
        }
        listPage {
            field("Name")
        }

    }

    document "Shipment" {
        ShortName = "Ship";

        header "Shipment Header" {
            ShortName = "Ship Header";
            StatusCaptions = ["Open", "Released"];
            fields {
                include("ContainerNo"; "Container"."No.")
            }
        }

        line "Shipment Line" {
            ShortName = "Ship Line";

            fields {                
                field("Quantity"; Decimal)
            }
            listPartPage {
                field("Quantity")
            }
        }
    }

    ledgerEntry "Container Ledger Entry" {
        ShortName = "Cont. Ledger Entry";

        fields {
            include("ContainerNo"; "Container"."No.")            
            field("Quantity"; Decimal)
        }
        listPage {
            field("Quantity")
        }
    }

}
joneug commented 3 years ago

Pushed a fix for this issue. It will be made available in the next release of mdAL (and its corresponding VS Code extension).