- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2023 06:12 AM
Need to know why the cancel button I created is not cancelling the request as well:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2023 07:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2023 07:18 AM - edited ‎07-05-2023 07:21 AM
Your script plus my script.
var req = new GlideRecord('sc_request');
req.addQuery('sys_id', current.request);
req.query();
if(req.next())
{
req.stage = 'closed_incomplete';
req.state = 4;
req.update();
}
current.request_state = 'closed_cancelled'
current.stage = 'closed_incomplete';
current.state = 4;
current.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2023 07:22 AM
like this?
current.request_state = 'closed_cancelled';
current.stage = 'closed_incomplete';
current.state = '4';
current.update();
var request = new GlideRecord('sc_request');
var currentReq = current.request;
request.addQuery('sys_id', currentReq);
request.query();
if(request.next())
{
request.request_state = 'Closed Cancelled';
request.stage = 'Closed Incomplete';
request.state = '4';
request.update();
}
can you paste the script on how you believe it should be?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2023 07:23 AM
Yes like this, I added the script too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2023 07:27 AM
Amazing it worked, I appreciate that!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2024 04:20 AM
What if there are multiple requested items are there ?