Forum Post: Re: Perform Page Reload After Record Is Saved - New Ui

  • Thread starter Thread starter Mohammed Siraj
  • Start date Start date
Status
Not open for further replies.
M

Mohammed Siraj

Guest
Iram, on form submit when the user is re-directed, the following page if it is an EDIT page signifies form submission failed. Else, it was a success. That is you should not run this script on form submit but have it in the destination page where the user will get re-directed. Understand that it is not that straightforward approach, but there is no custom event which signifies form submssion is success as there could be server-side validations that will cause record save to fail. In case you do not have any server-side field custom validation or validation triggers configured, then you can simply check if client-side validation is a success. For that, on form sbumit handler: var formDetails = rb.newui.page.PageContext.getFormDetails(rb.newui.util.EDIT_FORM_NAME); var validator = formDetails.getKendoValidator(); if (validator && validator.validate()) { //validation true... window.top.location.reload(); }

Continue reading...
 
Status
Not open for further replies.
Back
Top