- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2025 01:12 AM
g_form.save();
g_navigation.open('incident_list.do');
I implemented the above script in a client checked UI action and tried to move the screen after saving the record.
However, the record was not saved and the screen moved forward.
If you just use "g_form.save()" it will be saved.
I tried to implement asynchronous processing by referring to the following article.
https://www.servicenow.com/community/developer-forum/is-g-form-save-async/m-p/2936035
g_form.save().then(g_navigation.open('incident_list.do'));
But the results were panned without being saved.
Is there a way to save a new record and then transition to another screen?
I need to make this a client specification because I want to display a popup.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2025 01:52 AM
why not use client + server code using gsftSubmit()
in server side use this
current.update();
action.setRedirectURL('incident_list.do');
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2025 01:19 AM
where have you written this script?
What's the current behavior?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2025 01:32 AM
Created using UI actions.
The client checkbox is checked.
When clicked, "test( )" is executed.
function test( ){
g_form.save().then(g_navigation.open('incident_list.do'));
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2025 01:52 AM
why not use client + server code using gsftSubmit()
in server side use this
current.update();
action.setRedirectURL('incident_list.do');
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader