Display specific records to specific role

Hello Community, Since when I am facing some problem for displaying particular data to some roles.   I have two entities CreditLimitRequest and BUMaster.  For both entities I have took association from Account Entity. I want that that, I have assigned pratap as a BU leader of sameer and aalmeen.   Now, when Pratap will login then he can see the data of sameer and aalmeen both.  And when vineet will login then he can only see the data of shreya not other sales people. I tried many ways and asked many a times in forum but no one answered. To display data to BU leader I created a microflow   How can I achieve this ? When I login as pratap then only sameer’s data is visible not aalmeen. Please help me to solve this problem. Thank you.    
1 answers

Hi Dev,

The easiest (and most secure) way to achieve this is using entity access on the entity in your domain model: https://docs.mendix.com/refguide/access-rules/
Per userrole you can define (using xpath) what data they may or may not see. If you only restrict the data on the page but not on entity level, a clever user can still retrieve data that you would not want him to see.

Good luck!