- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2023 02:10 AM
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?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2023 03:27 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2023 04:30 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2023 02:15 AM
Hi @Prashant Kumar6,
Try by updating as: gs.setRedirect(url, '_blank'); instead of window.open(url,'_blank');
If my response helps to solve your issue. Kindly mark it as helpful & correct. It will be helpful for future readers.
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2023 02:40 AM
Hi @Sagar Pagar
I tried that and it is still not working .
url = '/tm_test_case.do?sys_id' + TMTC1;
gs.log("Prashant1" + url);
//action.setRedirectURL(url);
gs.setRedirect(url, '_blank');
Getting logs with correct sys id, however it is not opening in a new tab. Any idea?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2023 02:50 AM
Hi @Prashant Kumar6,
It should work for you. Make sure that you are creating the correct url.
Can you try this and let me know. Is it working?
url = '/tm_test_case.do?sys_id' + TMTC1;
gs.log("Prashant1" + url);
//action.setRedirectURL(url);
gs.setRedirect(url);
If my response helps to solve your issue. Kindly mark it as helpful & correct. It will be helpful for future readers.
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2023 03:41 AM
Hi @Sagar Pagar ,
Tried with
url = '/tm_test_case.do?sys_id' + TMTC1;
gs.log("Prashant1" + url);
//action.setRedirectURL(url);
gs.setRedirect(url);
This is opening the record in the same tab , My requirement was to open that a new tab not on the same tab .