how can we write the on submit client script for saving the form and redirect to the same page when we click on Submit button,the functionality of Submit button is by clicking on that it will redirect to list of records.How can we achive this by on s
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2016 09:59 PM
OnSubmit Client script for when we click on Submit button it needs to stay in the same page after saving the form:
how can we write the on submit client script for saving the form and redirect to the same page when we click on Submit button,the functionality of Submit button is by clicking on that it will redirect to list of records.How can we achive this by on submit client script.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2016 10:21 PM
use this in client script
window.open("<your table_name>.do?sys_id="+g_form.getUniqueValue()","_self");

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2016 10:23 PM
corrected
window.open("<your table_name>.do?sys_id="+g_form.getUniqueValue(),"_self");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2016 10:27 PM
I tried with this,did n't get expected result .because how sysid will generate once we click on submit.i put some alert to find which sys id is coming.it is returning previous record sys id.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2016 10:30 PM
What do you mean by previous record sys_id.? sys_id of a record is generated on load. So when you say g_form.getUniqueValue() it will give you the sys_id of that record you are about to submit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2016 10:54 PM
you want the submit button to exactly as save button??
I read someone on here state quite nicely that if you change the behaviour of something as widely used as Submit you cause confusion to users
I suggest pushing people to use the save button and education