- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 01-25-2020 02:47 AM
This code can redirect you to new tab and as well as stay in current form of UI Action.
I hope this code will help you.
function openInNewWindow() { //Client Side scripting
curr_request = g_form.getValue('call_type');
if(curr_request=='sc_request'){ // request choicelist
var curr_item = g_form.getValue('request_item');
url="/sp?id=sc_cat_item&sys_id=" + curr_item; // redirect to service portal link
var win = window.open(url, '_blank');
win.focus();
}
gsftSubmit(null, g_form.getFormElement(), 'sysverb_insert_and_stay');
}
if(typeof window == 'undefined')
StayOnCurrentForm();
//Server-side function
function stayOnCurrentForm(){
current.insert();
action.setRedirectURL(current);
}
// code created on 25-01-2020
- 1,566 Views