how to change the status of sc_req item dynamically in workflow ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2024 07:02 AM
With the help of scripting i want to change the status of sc_req item dynamically with the help of scripting in workflow , anyone help me
Set Value is not working in workflow

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2024 07:03 AM
@1dusjhyahnt Can you share the script which you have tried?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2024 07:06 AM
var ritmGR = new GlideRecord("sc_req");
ritmGR.get(current.sys_id);
gr.initialize();
current.state= 6;
gr.insert();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2024 07:10 AM - edited 02-13-2024 07:11 AM
var wr = GlideRecord('sc_req_item');
wr.addQuery('write_your_query');
wr.query();
while(wr.next())
{
wr.state = '1';
wr.update();
}
Please write your code as per your requirement
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2024 07:13 AM
i only want my request status is resolved how we will get this ??