IWEventRegistry.addFormHandler("onSaveValid", validateForm);...function validateForm() {// Determine if the form is valid....if (formValid) {return true;} else {alert("Form is invalid ...");return
Have you tried the code on page 30 of the FormAPI manual ? IWEventRegistry.addFormHandler("onSaveValid", validateForm);...function validateForm() {// Determine if the form is valid....if (formValid) {return true;} else {alert("Form is invalid ...");return This is confusing because the event should only happen if the form is valid, which implies the else condition should never happen. But it looks like it is worth a try.
Is there a way [...] when I click on the customize save button, then actual save buttons events are getting called?
If that's the case, why would you need custom Save in the first place? If you want some additional processing upon saving you can do itby intercepting standard onSaveValid Event.
[...] I need to validate the DCR, if the DCR is valid then only call the custom save function otherwise give an alert some fields are required. I am not able to validate all fields one by one, because there more types of DCT and each having different required fields.
You're thinking about the validation process the wrong way. Spend some time reading (not just skimming rapidly) the FormAPI manual and you'll find that there are a number of functions that you can utilize to write generic form validation code which can be used in any DCT. Then you only have to worry about DCT-specific special processing if any such exists (which should hopefully be minimal)