I need to update the RITM approval state to approved when request approval state to approved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2019 03:28 AM
I need to update the RITM approval state to approved when request approval state to approved.
To implement this i wrote the after BR update on Request table .
Below is the script
var gr = new GlideRecord("sc_req_item");
gr.addQuery("request", current.sys_id);
gr.query();
if (gr.next()) {
current.approval ='approved';
current.update();
Please let me know if any issues on this which i need to correct .
- Labels:
-
Request Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2019 03:40 AM
After update business rule on Request table
condition: approval changes to Approved
script:
var gr = new GlideRecord("sc_req_item");
gr.addQuery("request", current.sys_id);
gr.query();
if (gr.next()) {
gr.approval ='approved';
gr.update();
}
Thanks
VM1104
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2019 04:10 AM
Hi,
Still not working.
Regards,
Megana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2019 04:56 AM
Why not use a Set Value activity on the RITM workflow. The RITM WF should get held up until the REQ WF is complete, which would imply the approval was successful. So, I would just use a Set Values activity to "Approval" is "Approved".