ui action redirecting it to previous page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2024 02:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2024 02:13 AM
Hi @tghadage124 ,
Can you elaborate more about what you are trying to do.. so that i can help you with..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2024 02:22 AM
Here , There is UI action button request closure when its clicked three fields will be mandatory as mentioned below.
u_close_code , u_percentage_complete, u_is_this_request_completed.
for that code is :

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2024 02:18 AM
Hi @tghadage124
try this:
function onredirect(){
g_form.setMandatory('u_close_code',true);
g_form.setMandatory('u_percentage_complete',true);
g_form.setMandatory('u_is_this_request_completed',true);
gsftSubmit(null, g_form.getFormElement(), 'current_page'); // current_page should be your action name on the ui actin
}
// Server side code
if (typeof window === 'undefined') {
current.update();
action.setRedirectURL(current);
}
Hope this helps!!!
Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2024 04:16 AM - edited 08-27-2024 04:17 AM
Have tried your code its still the same error coming in , its taking me back to previous page.
thanks!!