How to make specific fields editable for different roles without using scripts? #206362
|
In Frappe/ERPNext, I have a DocType where I need different roles to edit different fields. For example: Role A: can edit Field A and Field B Is this possible using only the standard Frappe/ERPNext UI permission configuration, such as Role Permissions Manager or field-level permissions? I specifically want to achieve this without Client Scripts, Server Scripts, custom hooks, or any other code. What is the recommended configuration for this use case? |
Replies: 1 comment 1 reply
Recommended Configuration (Speaking from experience)Suppose you have:
Configure the fields like this:
Then configure Role Permission Manager:
Important: Level 0 is the base document permission. Both roles generally need Read + Write at Level 0 to be able to save the document. The field-level restrictions are then controlled using the higher permission levels. For stricter separation, you can also place fields that neither role should edit at a separate permission level:
Then configure:
The key concept is that Perm Level connects fields to the corresponding permission level in Role Permission Manager. So the recommended approach is:
This can be configured entirely through the standard Frappe/ERPNext UI. No Client Script, Server Script, custom hook, or other code is required. |
Recommended Configuration (Speaking from experience)
Suppose you have:
Configure the fields like this:
Then configure Role Permission Manager:
Important: Level 0 is the base document permission. Both roles generally need Read + Write at Level 0 to be able to save the document. The field-level restrictions are then controlled using the higher permission levels.
For s…