Custome DocType Field Display for Single User


We had created a custom DocType as “ABC” and we have a field called as “posting_date”.
We need to display the field only for one user with write permission. eg: “MYNAME”, I’m not sure how to set it.
Can any one please help to sort it out its bit emergency.

Steps Followed:

  1. Used Depends on with the field “posting_date”, eval:doc.username==“MYNAME” - The field gets hidden from all users.
  2. Set Perm Level as 5 with Write access and Level 0 for doc access and set the Per Level for the field as 5 - it also hide the field from all user.

Please help out.

Thanks in Advance

Can you please clarify what is the problem?

This does not look like a good solution. I don’t think the user should be hardcoded.

Did you also give the permissions to the user, to access this perm level? See Managing Perm Level for more info.

Please provide more information about your use case, for example, if the field should be visually hidden, read-protected or write-protected for all users except one.

I want to give access for the field posting_date for only limited users with write access, to provide the access I had a try with the above two steps…

User 1 → posting_date can access/edit
User 2 → posting_date should be editable

Should be write-protected for all users except one.