- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2021 11:44 PM
Hi Team,
Having a requirement to write a ACL to allow only members of a particular group to edit three user defined fields in location table. Kindly suggest.
Regards,
Kayathri
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2021 08:18 AM
Hi,
so members of that group should be allowed editing only 3 fields
All others should be readonly
Do this
Display BR on your table:
g_scratchpad.isMember = gs.getUser().isMemberOf('Group Name');
onLoad Client Script:
function onLoad(){
if(g_scratchpad.isMember.toString() == 'true'){
// make all fields readonly
var fields = g_form.getEditableFields();
for (var x = 0; x < fields.length; x++) {
g_form.setReadOnly(fields[x], true);
}
// make those 3 fields as editable
g_form.setReadOnly('fieldA', false);
g_form.setReadOnly('fieldB', false);
g_form.setReadOnly('fieldC', false);
}
}
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
07-22-2021 04:50 AM
Glad to help.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2021 04:51 AM
Would you mind closing this question by marking appropriate response as correct
How to translate, None in Arabic, where None is OOTB
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader