Set RITM to Work in Progress
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2022 08:51 AM
Hello Experts,
I wanted to set RITM state to "Work in Progress" when any catalog task state of that RITM is set to "Work in progress", I have written the below script "after" update BR on Sc_Task table, It works as expected but some Random blank RITMs are getting created. Assuming that is because sc_task doesn't have request_item as soon as gr.update(); happens on the empty gliderecord it is inserting the new record.
Is my assumption correct? if so, what is other alternative to achive this requirement.
After update BR on sc_task table:
(function executeRule(current, previous /*null when async*/ ) {
var gr = new GlideRecord('sc_req_item');
gr.get(current.getValue('request_item'));
gr.state = 2;
gr.update();
})(current, previous);
Thanks,
Rocky.
- Labels:
-
Request Management
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2022 10:51 AM
Hi,
I tried but no luck.
Thanks,
Rocky.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2022 11:23 AM
What is the "When to Run" conditions you are using?