need to stop the form submission on workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2025 01:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2025 03:16 AM
yes, I checked that have three events one is show error message and another one redirect to the list screen that was correct but why the form is getting saved without filling the mandatory fields
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2025 03:17 AM
can you share the code for that Save button?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2025 03:17 AM
@Ankur Bawiskar ,
Do you know how to write the client scripts in workspace to stop the form submission..
if you provide that i will link that client script to the save button.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2025 03:32 AM
simply use onSubmit client script on your table and see value is empty or not
if empty then stop form submission
function onSubmit() {
if (g_form.getValue('assigned_to') == '') {
alert('Please fill assigned to');
return false;
}
return true;
}
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