I need to create a 'cancel' Ui button in the incident form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
using Ui actions, I need to create a cancel Ui button in the service operations workspace, when we click cancel button, it should cancel incident and state should move to cancel state, by adding work notes as well, guide me the step-by-step process and script.
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago - last edited 3 hours ago
Hi @suryaogeti1,
what you have tried yourself. COuld you possibly share your blockers, errors or your UI Action to review? :))
This is not to do your job but rather to get support, but the efforts shall go both ways
EDIT: you can just change the state, add comment and save it no?
100 % GlideFather experience and 0 % generative AI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi @suryaogeti1
Where do you experience issues in your configuration?
If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.
Best regards
Anders
Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi @suryaogeti1 ,
I was able to implement this successfully in Service Operations Workspace using a UI Action.
Approach:
- Created a UI Action on the Incident table
- Enabled Workspace Form Button
- Used Workspace Client Script to trigger the action
- Used server-side script to update the record
Workspace Client Script:
if (!confirm("Are you sure you want to cancel this incident?")) {
return;
}
g_form.submit('cancel_incident');
}
Server-side Script:
current.work_notes = "Incident cancelled by " + gs.getUserDisplayName();
current.state = 8; // Cancel
current.close_code = "Closed/Resolved by Caller";
current.close_notes = "Incident cancelled";
current.update();
action.setRedirectURL(current);
}
Result:
- Clicking Cancel Incident shows a confirmation popup
- On confirmation:
- Incident state moves to Canceled
- Work notes are added
- Record updates successfully in Workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi @suryaogeti1
Step by step instruction is given in this community post.
Refer : Create a cancel button in SOW
