lundi 11 avril 2011

How to add a table and join it to another in a form

For example when you need to get fields from a table joined to a table inventTable for example in your form, just create your relation in that table, then add it in the form , set it joinSource proprety  to inventTable , specify the appropriate LinkType, set the two propreties: InsertAtEnd to no if you don't want to create a new row when scrolling through records and getting to the bottom, and InsertIfEmpty to no if you do not want AX to automatically add a new record if no records exist.
Override the method validateWrite in your dataSource and write this code form example to validate the join SourceProprety : 

boolean validateWrite()
{
    ;
    Thy_InventItemPrint1.ItemId = inventTable.ItemId;
    return super();
}

Aucun commentaire:

Enregistrer un commentaire