Edit a read only field (value) as Admin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2017 03:22 AM
Hi, i have a coloumn that is read only. But now i have to change a few values and i'm the serviceNow admin. But how can i do that, without making the fileld non read only and then read only again after i have changed the values. There must be a smarter way
- Labels:
-
Best Practices
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2017 03:27 AM
Hi Kristian,
Create write ACL for that field and exclude the "Admin" for editing this field.
So only ITIL users it will displayed as "read-only" field and for admins it will be normal editable field.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2017 04:33 AM
Write an OnLoad client script :
if(g_user.hasRole('admin')){
g_form.setReadOnly('fieldname',false);
}
Make the changes and delete the client script.
OR
Write a write acl and make a condition to make field editable if the role is admin. Once the changes are done, remove the ACL.
post me your feedback
Please Hit ✅Correct, âÂ��Helpful, or ��Like depending on the impact of the response
Have a lovely day ahead
Regards,
Divya Mishra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2017 04:37 AM
you can always use background script> write your script and change the value as per the need.
other way is open the record press alt+crtl+shift+J ; java script executor will pop up ; write the client script to change the value of field and execute; after that save the form.