redirect after submitting in custom app
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi,
I have a custom app I am making in ui builder and I am wondering if someone can help me with a updating a the script on a ui action so that after I submit a form, it goes back to the list view of the form just like in native ui.
I tried the following script but it is still not redirecting back to list view after submitting successfully:
answer = current.insert();
if(answer){
action.setRedirectURL(current.getTableName() + '.list')
}
gs.include('ActionUtils');
var au = new ActionUtils();
au.postInsert(current);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @BrianaC
can you share me screenshot what you are created, it is declaractive action or ui action
and can you please check the scope as well what is table scope and your button scope in which its created.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Sanjay191
I have created a UI action and it is in the global application but for my specific custom table which is an app I made in UI Builder. I added lines 2-4 to the script, the rest is OOB from the submit action used elsewhere in the instance (like sow)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi @BrianaC
I thing this table created in custom application right ?
can you please try to create it in to your custom application and then try it please .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
so this is shown in workspace only and you want to redirect to list
do you want to Workspace List in workspace itself?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
