how to redirect user to a different page and close it automatically using a server side script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
how to redirect user to a different page and close it automatically using a server side script inside a UI Action:
how can i adjust this script so that it wil redirect to the new window but it will be closed automatically
if (result.status === 'success' && result.attachment_id) {
var downloadURL = '/sys_attachment.do?sys_id=' + result.attachment_id;
action.setRedirectURL(downloadURL);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @Alon Grod ,
it's not possible open a new window from server side script.
you can make this UI Action to run on client side and use the g_navigation or window.open to open the new window
and move the logic to the client callable script include and use GlideAjax in the UI action to perform the action
there is a method setReturnURL(to set the return url after the follow up action is taken on the redirected url) in the server side but it won't work in this scenario
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
53m ago - last edited 53m ago
If this UI action is at client side, you can try
window.open(url, '_blank');
If this is server side, you can try:
action.setRedirecturl() method.
