Question
5
Replies
359
Views
Posted: February 25, 2016
Last activity: August 2, 2016
Closed
Solved
how to make an exception to a case level 'validate' rule?
i leveraged the oob validate rule to validate certain properties when the case is saved, i need to make an exception for a save button. would you please advise? i need to be able to save even though the properties in the validate rule do not have values?
Message was edited by: Vidyaranjan Av| Included category
I assume this is common. For instance, is your situation something like "the zip code is required so we won't let you SUBMIT without entering one, but you can SAVE without entering one since you'll be entering it later before you SUBMIT" ?
How you actually code it would depend on whether you are using client-side validation or not, since client-side means the browser script code needs to handle it.
However, the GENERAL logic is something like:
if (doingSubmit())
if (!zipCodeSupplied())
reportError ("zip Code required");
else
doSubmit();
else
if (doingSave)
doSave();
I suggest you look at what the options are for actually conveying this with ootb pieces both for the client-side validation and for the server-side validation using validate rules.
/Eric