Record producer client script onSubmit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2019 03:13 AM
Dear all,
When we define a client script on record producer of type onSubmit
Q1 : Does this script is executer before record gets submit, at same time record gets submit, or after record gets submit and recorded ?
Q2 : I am calling my record producer by using a GlideModal APi, is there a way to close the GlideModal on this onSubmit script ? I have try GlildeWindow.get().destroy() but it does not work
Any idea ?
regards
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2019 03:35 AM
Hi wakespirit,
Your onsubmit script will only run when user click on "Submit" button.
In your Record produser script at the end try this code.
var urlOnStack = GlideSession.get().getStack().bottom();
response.sendRedirect(urlOnStack);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2019 04:55 AM
what this script will do ?
I place it in my Record producer client script onSubmit, but it does not works it hangs the submit process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2019 05:35 AM
Hi,
The onSubmit client script execute after clicking on ''submit'' button on form
After submitting the button the records get populated into the table which is specified in Record producer.
For closing the GlideModal on the onSubmit client script ,the below code may help you.
var modal = new GlideModal('page');
modal.setBackdropStatic(true);
For more details refer the below link.
Please mark correct/helpful if it helps for you
Regards,
Pooja
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2019 05:53 AM
var modal = new GlideModal('page');
modal.setBackdropStatic(true);
This 2 line close the window or should I call the GlideWindow,get().destroy() after this 2 line on onSubmit scrip t?
Thanks for clarification