I would like to run some javascript if an item fails to save from NewForm or EditForm. Does such a thing exist?

1 Answer 1


Saving process occurs on the server side, during the postback, long after any JavaScript has a chance to do anything.

So the short answer is - no SaveFailAction does not exist.

  • It is odd though... server does send a message back to the page, that's why you get error msgs; can't save because unique field already exists, etc. I would have though there would be a method to do something in such an event. PreSave functions then need to be limited to assuming the user may change their mind and cancel saving if they encounter an error, instead of an OnError function resolving said error in background.
    – BDC604
    Apr 15, 2019 at 16:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.