UI action to open in new window/Tab

Prashant Kumar6
Giga Guru

Hello Experts, 

 

I have created a UI action on story form (rm_story) to create test case (tm_test_case), which is working fine . Now I want to open that in new Tab of the browser , for that I used below code and it is not working . When I used Log it is showing "com.glide.script.RhinoEcmaError: "window" is not defined." 
Note : Isolated script : false . Can anyone please help here?

create_test();
 
function create_test(){
var url;
var TMTC1 = '';
var TMTC = new GlideRecord('tm_test_case');
 TMTC.initialize();
 TMTC.u_type = current.u_test_case_type;
  TMTC1 = TMTC.insert();
 
url = '/tm_test_case.do?sys_id' + TMTC1;
gs.log("Prashant1" + url);
window.open(url,'_blank');
}
2 ACCEPTED SOLUTIONS

Samaksh Wani
Giga Sage

Hello @Prashant Kumar6 

 

try this once :-

 

 

 

g_navigation.open(url);

 

 

 

Plz Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.

 

Regards,

Samaksh

View solution in original post

praneeth7
Tera Guru

Hello @Prashant Kumar6 

 

This link might help you on this How to Open an URL in New Window from UI Action? 

 

Please mark Helpful if you find this useful. 

Thank you

Praneeth 

View solution in original post

10 REPLIES 10

Hello @Prashant Kumar6 

 

Link which praneeth shared with you have also the same script g_navigation.open() which i mentioned above,

 

Plz Mark my Solution also Accept as well.

 

Regards,

Samaksh