- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2025 03:20 AM
Hi Team,
How to create a custom cancel UI Action in case table for native view and workspace view
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2025 10:01 PM
you need to write script in workspace client script.
if (g_form.getValue('comments') == '') {
g_form.setMandatory('comments', true);
g_form.addErrorMessage("You must add a reason in Additional comments in order to reopen an incident");
return false;
}
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
01-31-2025 01:48 AM
Hi @Ankur Bawiskar ,
in the same script I want to check if Additional comments as mandatory, When we are cliking on cancel if additional comments needs to fill, if not then it should show error message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2025 02:14 AM
I believe I have answered your original question.
To check field is mandatory simply check if field comments is empty
if yes then show error message and make it mandatory
I hope you can do this and enhance further based on your developer skills.
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
02-02-2025 05:32 AM
Hope you are doing good.
Did my reply answer your question?
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
02-02-2025 09:58 PM
Hi @Ankur Bawiskar ,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2025 10:01 PM
you need to write script in workspace client script.
if (g_form.getValue('comments') == '') {
g_form.setMandatory('comments', true);
g_form.addErrorMessage("You must add a reason in Additional comments in order to reopen an incident");
return false;
}
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