Basically, there are two entities / tables that have a many-to-many relationship between them therefore I have set up an intermediate table that inherits the PKs of the two entities as FKs.
Table 1 – Machine Type (PK is ‘MachineTypeCode’)
Table 2 – AddOn (PK is ‘AddOnCode’)
Table 3 - AddOn-MachineTypes – this is the intermediate entity that inherits the PK from AddOn table and the PK from the MachineType table.
I have created the Add-On Header page and wish to allow the user to add Machine Types as Lines (somewhat similar to adding InvoiceLines to the Sales Invoice Header).
For each instance of the Add-On record (Add-On Header), the user should be able to add multiple lines for the Machine Type record (e.g. Add-On “GPS” is suitable for multiple Machine Types (Dozer, Excavator, etc). Each of these Machine Types should be added as Lines. Furthermore, for each Add-On, Machines Types cannot be of the same type – e.g. GPS Add-on cannot have two lines of the same Machine Type.
To facilitate the “Lines”, I have created a ListPart page based on the intermediate table and have added it as a part to the Add-On Header page.
However, when attempting to add more than one line, the following error is presented