Hi I want to Hide few fields in Incident form for certain groups in servicenow how can i achieve this thourght UI policy or ACL or Business rule.

siddharth26
Tera Guru

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

1 ACCEPTED SOLUTION

Glad that it worked.

Would you mind marking my response as correct & helpful if I am able to resolve your query?

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

27 REPLIES 27

Hi,

You will have to call script include function from the UI action condition and return true or false

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

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

 

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?

Hi,

place all the condition inside script include function and call that script include function from UI action condition field.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

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)