- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2020 08:20 AM
Hi all,
I want to Hide few fields in Incident form for certain groups accessing it in servicenow. how can i achieve this thorough UI policy or ACL or Business rule.
thanks
Siddharth
Solved! Go to Solution.
- Labels:
-
Application Portfolio Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2020 10:35 PM
Glad that it worked.
Would you mind marking my response as correct & helpful if I am able to resolve your query?
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
12-23-2020 07:05 AM
Hi,
You will have to call script include function from the UI action condition and return true or 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
12-23-2020 07:29 AM
ok!
two different things to hide for same set of assignment groups
1) To hide related lists I've tried the below client script (with d same BS rule as mentioned above for hiding d form fields)
But the related list is still visible when impersonated to the user of one of the set of assignment groups
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-24-2020 05:18 AM
Current UI action already has a condition over state and approval status too how can I include the usercondition validation one the sytem peroperty created (with set of assignment groups - groups ID's) and map it to the script include?
Could you assist?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-24-2020 05:42 AM
Hi,
place all the condition inside script include function and call that script include function from UI action condition field.
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
12-24-2020 09:18 AM
Hello Ankur
As suggested I defined the below script include
var RCAApprovalHide = Class.create();
RCAApprovalHide.prototype = {
initialize: function() {
},
group : function(gs){
var gr = new GlideRecord('sys_user_grmember');
gr.addQuery('user', gs.getUserID());
gr.addQuery('group', 'IN', gs.getProperty('AssignedGroups'));
gr.query();
if(gr.next()) {
return true;
} else {
return false;
}
},
type: 'RCAApprovalHide'
};
I've alled the function in UI condition but when impersonated nothing reflects
new RCAApprovalHide().group(gs)