this is customer master page … i have added new field (amicable rate field) these field should be read only after saving so no one can change it later except admin he can change after saving …
i add this client sript and its working … after saving the page the amicable field will be read only but the problem is admin cannot edit this field i need to give admin access to edit after save .
You will have to use an if statement along with frappe.user.has_role("Your Specific Role")
and set the condition accordingly.
1 Like
i tried it but not working
In your client script add the following line
if (!frappe.user.has_role('Administrator')) {
// your code here
}
1 Like
Now its working … thanks