- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2015 11:10 PM
I want to validate a field for duplicate entry before saving the record.
So I would like a client script to validate the value and if the value is not valid I will display a field message (got that part) but then I want to prevent a save/submit to be performed. How can I do that?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2015 11:27 PM
Hi Tommy,
If you're trying to do this validation from an onSubmit client script, I believe you can then return false within your script when the value is not valid and the submission will be stopped.
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2015 11:36 PM
You're welcome
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2016 02:29 PM
This works for stopping an update, but the "Closed Complete" button will ignore the client script and update the record anyways. Any idea why?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2016 12:09 AM
Hi Shane, if that's happening the something could potentially be wrong with your client script. You may also want to check your browser's console to make sure that there's no errors from your or other scripts at your instance that could be affecting the execution of your client script validation.
I hope this helps!
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2015 11:32 PM
You need to do something like this
on Name field present in sys_user_group table we have unique key Rule, whenever you try to insert duplicate value it will throw an error as shown in Image.
Thanks & regards
Govind Kumar Sharma
PS: Hit like, Helpful or Correct depending on the impact of the response.