- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2022 02:38 AM
Hi All,
I have been trying of update variable value on an active RITM. So far I have tried these two script.
gr.addQuery('request_item', 'RITM0010056');
gr.addQuery('sc_item_option.item_option_new=685495a21b53415054eca752b24bcb25');
gr.Query();
if(gr.next()){
gr.sc_item_option.item_option_new.value == 'No';
gr.Update();
}
Solved! Go to Solution.
- Labels:
-
Request Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2022 02:54 AM
Hi,
this should work provided is_extension_on_access_needed is not within MRVS
Are you sure the value you are giving is correct?
var gr = new GlideRecord('sc_req_item');
gr.addQuery('sys_id','eec9cfc287234d502d2d33b40cbb35b5');
gr.query();
if(gr.next()){
gr.variables.is_extension_on_access_needed = 'yes';
gr.update();
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2022 02:54 AM
Hi,
this should work provided is_extension_on_access_needed is not within MRVS
Are you sure the value you are giving is correct?
var gr = new GlideRecord('sc_req_item');
gr.addQuery('sys_id','eec9cfc287234d502d2d33b40cbb35b5');
gr.query();
if(gr.next()){
gr.variables.is_extension_on_access_needed = 'yes';
gr.update();
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2022 04:05 AM
Hi Ankur, yes, is_extension_on_access_needed is not with in multirow VS.
What I am trying to achieve is take user's response from mail and write a inbound action and update is_extension_on_access_needed (yes/No). if answer is 'No' workflow will come out of loop and creates a Task for fulfiller group. if users' response is 'yes' inbound bound script should update the RITM and workflows remains in loop till timer reaches next 'extension end date'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2022 04:20 AM
Hi Ankur, I have been using incorrect syntax, I fixed it and got it to work. I overlooked in line 3.
Thank you for your help 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2022 08:36 PM
Correct
Glad to know.
Please close the thread by marking appropriate response as correct.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader