- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2017 05:58 AM
My Change Manager would like the 'Parent' field on Change Request (Task table reference) to be limited to Incident and Problem records only when the Type == Emergency, otherwise the entire Task table can be used. I've got a reference qualifier:
sys_class_name=incident^ORsys_class_name=problem^EQ |
But how do I apply it only in that case?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2017 06:03 AM
Look at using an advanced reference qualifier (a script of your choosing.) Pass the function your type, it can then return the proper filter string (either the above or nothing.)
javascript:myConditionCheck().changeType(current.type);
var myConditionCheck = Class.create();
myConditionCheck.prototype = {
initialize: function() {
},
changeType : function(changeType) {
if (changeType == 'Emergency')
return 'sys_class_name=incident^ORsys_class_name=problem^EQ';
return '';
},
type: 'myConditionCheck'
};
http://wiki.servicenow.com/index.php?title=Reference_Qualifiers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2017 07:38 AM
add 'new' before myConditionCheck() in the reference qualifier.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2017 07:49 AM
Spell it out for me Mr Martin, just dumping 'new' in there isn't doing anything.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2017 07:53 AM