Cancel UI button issue on SIR (Security Incident Response) Module
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2025 08:18 PM
Hi All,
I am facing one issue with UI Action where i want to customize default cancel ui action button which validate work notes before cancelling.
Problem : When i am trying to execute client side and server side script at the same time on my company dev instance then it is not working but again if i am trying same code on personal developer instance it is working fine.
So i tried to change the action name on my company dev instance then it working fine.
Here is script
function onClick() {
g_form.setMandatory('work_notes', true);
gsftSubmit(null, g_form.getFormElement(), 'cancel');
}
if (typeof window == 'undefined') {
setCurrent();
}
function setCurrent() {
var wf = new global.Workflow();
wf.cancel(current);
current.state = 7;
current.update();
action.setRedirectURL(current)
}
Please help me on this issue
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2025 08:50 PM
if in your customer instance same action name is present then it may conflict
So it's recommended to have unique action name for each UI action in the instance.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2025 06:33 AM
Thank you for marking my response as helpful.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader