Create a cancel button in SOW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 11:11 PM - edited 03-06-2024 11:23 PM
'How to just create a cancel button to cancel a incident in any state. It should stay on the same page after cancellation in SOW".
I am confused which api to use, "g_aw. " or "g_modal." . A solution to this would be very helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 11:14 PM
Refer to this Below Links
Regards,
Shyamkumar
Regards,
Shyamkumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 11:19 PM
Hi @Somnath_snow ,
OOTB cancel button is not available on Incident table for both Native and SOW. You can create one like regular how you create an UI action and have the below settings highlighted in yellow updated to have it in workspace as well:
Script:
current.state=8;
current.update();
action.setRedirectURL(current);
Sample Screenshot:
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 11:26 PM
Yes that's correct. But i want the button in SOW. Would you please enlighten on that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 01:43 AM
Steps mentioned above will work for SOW as well. Please follow the steps highlighted in my solution above, also refer to screenshots which contain all the details.
Attaching here again for reference:
1. Create a UI Action on Incident table.
2. Update the script of the UI Action as mentioned above in my post.
3. Make sure to update the field "Workspace Form button" as true in the UI action form record as shown below:
Result:
Once you click the state of on incident record, state of incident will go to cancelled and redirect back to the same page again.
Regards,
Shloke