wait for condition
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi All,
I am writing the script in the sc_request workflow (wait for condition) that untill the all the RITM is not approved the REQ show requeste but below script is not working in the wait for condition.
answer = (function () {
if (!current || !current.sys_id) return false;
var reqId = current.sys_id.toString();
// 1) If any child is still waiting for approval
var waiting = new GlideRecord('sc_req_item');
waiting.addQuery('request', reqId);
waiting.addQuery('approval', 'requested');
waiting.setLimit(1);
waiting.query();
if (waiting.next()) return false;
}
Can you guide me to resolve the issue.
0 REPLIES 0

