Stakeholder view orders that are associated to him

0
In my application I want to give a stakeholder access so that he can see his orders. I have create an user role for stakeholders and an Orders / OrderItems and Stakeholder entity in the domain model. I want to create a data grid that only shows orders for the loged in stake holder. Any tips on how to approach this in Mendix would be hugely welcome.
asked
1 answers
0

Dex,

You can accomplish this through Access Rules on your entity (this will limit access throughout your app) or through an XPath restraint on the datagrid (which will limit the access for that datagrid only). If you have an unusual case, you can also source a datagrid with a microflow and, in the microflow, return only the Orders you want the Stakeholder to see.

All of these approaches depend on the association between StakeHolder and Order entities. This should be either a 1 to many (if your use case is that only 1 stakeholder has access to each order) or many to many (if your use case is that more than one stakeholder can have access to each order). Once this association is created (and populated during the order creation/entry process), you can use it in any of the 3 approaches described above.

Have fun!

Mike

answered