- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2014 09:02 AM
Hi All,
I have a UI policy that sets a few fields mandatory when a service alert is at post mortem stage. Our change manager has asked if these fields cannot be mandatory for him.
What would be the best way to action this? Can i set a true/false script inside the UI policy?
Solved! Go to Solution.
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2014 03:27 AM
Managed to get it to work. I used the following code:
function onCondition() {
var grpName = 'Service Assurance';
var usrID = g_user.userID;
var grp = new GlideRecord('sys_user_grmember');
grp.addQuery('group.name', grpName);
grp.addQuery('user', usrID);
grp.query(groupMemberCallback);
function groupMemberCallback(grp){
if(grp.next()){
g_form.setMandatory('u_actions_taken', false);
g_form.setMandatory('u_lessons_learned___proactive_', false);
g_form.setMandatory('u_root_cause', false);
g_form.setMandatory('u_updated_documentation', false);
g_form.setMandatory('u_vendor_report', false);
}
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2014 04:04 AM
Perfect
Kindly mark this thread as answered.