BartPermentier / al-toolbox

Adds Features to the AL Language Extension
MIT License
13 stars 9 forks source link

Duplicate EntityName & EntitySetName Error for API Pages #13

Closed KasperDeSmedt closed 4 years ago

KasperDeSmedt commented 4 years ago

Added 'Duplicate EntityName' & 'Duplicate EntitySetName' error. These will occur if multiple Page Object with PageType = 'API' the following fields in common:

And either (or both) of the following fields:

To disable this you can use the ALTB.DisbleAPIEntityWarnings setting in the workspace settings (this is not available in folder settings).

Command "ALTB: Renumber AL objects" now renumbers Extension objects:

Added command "ALTB: Copy fields to related tables" which copies all fields to all related tables (skips fields that are already on the related tables).

Added setting "ALTB.AdditionalRelatedObjects". With this setting you can add additional related objects using the following format:

[
    {  // For adding tableextensions
        folder: 'SalesHeader', // subfolder of src where to place the objects when using "ALTB: Start Project: Create Related Tables"
        objectType: this.AlObjectTypes.tableExtension,
        objects: [ // these tables wil be considered related
            { id: 36, name: 'Sales Header' },
            { id: 110, name: 'Sales Shipment Header' },
            { id: 112, name: 'Sales Invoice Header' },
            { id: 114, name: 'Sales Cr.Memo Header' },
            { id: 5107, name: 'Sales Header Archive' },
            { id: 6660, name: 'Return Receipt Header' }
        ]
    },
    ...
    {  // For adding pageextensions
        table: 'Contact',  // source table of pageextension
        folder: 'Contact',   // subfolder of src where to place the objects when using "ALTB: Start Project: Create Related Tables"
        objectType: this.AlObjectTypes.pageExtension,
        objects: [  // pages for the source table
            { id: 5050, name: 'Contact Card' },
            { id: 5052, name: 'Contact List' }
        ]
    },
    ...
]