Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2022 07:13 AM
Hi,
You code should be like this:
Note: Read the comment in line 3 and update code accordingly
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.addQuery('ci_item.operational_status','1'); // Check if operational status is Operational
taskGR.query();
return taskGR.hasNext(); // Return true if record returned. Otherwise return false
};
},