multi level reference

Hi, i am struggling with the following situation: I do have an entity invoices with a relation to contracts. The contracts entity has a relation with employees (and customers). So an invoice belongs to 1 contract and a contract belongs to 1 employee. At the newedit page of invoices I want to select te employee and the customer (and not some contract id). When I use a reference field, I cannot select the field for and Is there a way of doing this? Jay
1 answers

In the invoice page create a dataview with the contract and place the references inside that dataview. Do not forget to do a commit in the on change microflow of the reference.



[EDIT] You can let Mendix fill the dataview for you (then you have the standard layout), but most of the time you leave it empty so you can design your own form there. Choose the reference selector and place that one in the dataview. The commit is needed if you want to save the data. Since this is a dataview within another object the save button on the main page would just save that object and not the changed objects in the dataview. So these you have to commit yourself.