Hide a child field for other than document owner and few users

Hi,
I have a scenario where I have a value field, which I want it to be visible to the

  1. Document owner
  2. Few other users

I tried it with doing Permission Level but how I don’t know the way to allow it for the document owner as well.

Regards
Ruchin Sharma

Hello Ruchin,
Perm Level is primarily for grouping number of fields together, and then assigning permission to Roles for that group. Hence, you can set any perm level for an item, and then do permission setting for it.
You will have to assign the Read / Write permission to the Document Owner at the Perm level assigned.
Please refer the link for more information on Managing Perm Levels:
https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/managing-perm-level

Hi @ArundhatiS
I appreciate if you may let me know how to do this?

I am able to set the permission level for a particular field, but I am not aware how to use the below:

You will have to assign the Read / Write permission to the Document Owner at the Perm level assigned.

Actually, the same document can be created/viewed by n number of users. And, I want that only document owner and few other can only view that particular field.

Regards
Ruchin Sharma

@ArundhatiS
Its done by using Depends On Display properly:

I created a new role called Senior Sales Management and that role, and then I assigned that role to few of the users which can only see that field other than the document user. And then I used the Depends on Display property of Sales Value field like this:

eval:(parent.owner===user || in_list(user_roles,"Senior Management Sales"))

Regards
Ruchin Sharma

1 Like