How to allow current user only to edit his/her details

0
Hi All, I have an entity called Lead. I want to allow the leads to edit only his/her information. Like in data grid 2 we have edit button to edit the information, I want to this there. How to do that. PLease help me out, its urgent Thanks
asked
2 answers
1

Hello Trishla,

 

Depends how the lead is connected to the user account. I would recommend however a solution with entity access rules.

 

https://docs.mendix.com/refguide/access-rules/#xpath-constraint

 

For example:

 

When Lead has an association towards User you can add at your entity Lead a constraint at the like this:

[YourModuleName.Lead_User='[%CurrentUser%]']

 

By having this association and when it's set (important part :) ) only then an user can edit.

 

Thijs

answered
0

Hi Trishla,

 

I hope the lead entity is generalized from Account/User entity.

If that is the case, you can a button with visibility condition as $CurrentObject = $currentuser

answered