Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2022 08:29 AM
Hi,
Value of Retired is 6. So, in your code you can query whether Operational status is not 6.
isContainsRetiredCIs: function(change_request) {
var taskGR = new GlideRecord('task_ci');
taskGR.addQuery('task',change_request); // Use this line if change_request has sys_id. If it has Change Number then comment this line and uncomment next line
//taskGR.addQuery('task.number',change_request);
taskGR.addEncodedQuery('ci_item.operational_status!=6'); // Check if operational status is not retired
taskGR.query();
return taskGR.hasNext(); // Return true if record returned. Otherwise return false
};
},