Having a UI Action validate fields before save.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2011 09:40 AM
I have made a UI action button which changes the status of a record, then saves the record. Unfortunately any validations that should occur on save do not happen and we have a record with required fields not filled out that are not being reported on.
current.state='3'; //changes status to pending
current.u_status_detail='Review';
current.update();
action.setRedirectURL(current);
We use a client script to do the validation for this record state. I would like to be able to call this client script within the UI action rather than recreating the entire validation routine in the UI Action.
Please let me know if there is a way to force validation before the UI action saves.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2011 07:37 AM
Thank you Matt, I was able to leverage the dual functionality of a UI Action with my client scripts. The important step that I was missing was calling the submit using the syntax:
gsftSubmit(null, g_form.getFormElement(), '');
...then calling the rest of the UI Action by using the same Action name used in that line of code.
