How to make a readonly field as editable for users in particular group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2021 04:53 AM
I have a field company on cmdb_ci table which is read only for all users except admin. I want to make this field editable for only those users belonging to a particular group. can anyone please help me with the code or solution
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2021 06:21 AM
Also modify this condition
if(g_scratchpad.isMember.toString() == 'true')
{
//make necessary actions.
}
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2021 06:33 AM
no this isnt working, If you can let me know how to make the company field in the personal instance for cmdb_ci table as not read only for any of the group then I think this should work
Actually I tried both the ways which you have mentioned
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2021 06:45 AM
Hi,
if user is not a member then you want to make it readonly so you need to use this
if(g_scratchpad.isMember.toString() == 'false'){
// this means user is not member so do actions
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2021 07:00 AM
Ability to populate/update Company attribute on all CIs in CMDB.
This is what I want exactly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2021 06:44 AM
Hi,
if user is not a member then you want to make it readonly so you need to use this
if(g_scratchpad.isMember.toString() == 'false'){
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader