- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2023 11:55 PM
Hello Experts,
I have a UI action "Create Story" in Incident form. I want to open that in new window as of now it is opening in the same window. Please advise.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2023 03:40 AM
Apologies I haven't read your problem statement.
Yes for achieving the new tab functionality, you need to make the UI action as "client" and it is not possible in server side scripting.
and make a GlideAjax call, to server side and after inserting the record into the table please return the sys_id from server's end.
var url = "/rm_story.do?sys_id=" + answer)
g_navigation.openPopup(url)
Please find the link here for more information or let me know if you have some queries.
Do you need further help or If my answer solved your issue, please mark my answer as ✅Correct & 👍Helpful based on the Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2023 04:09 AM
This can be converted, please check the checkbox of client and follow the instructions as mentioned in below screenshot:
and please move your gliderecord's code in the script include and make a string from the server's end and return.
If my answer solved your issue, please mark my answer as ✅Correct & 👍Helpful based on the Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2023 12:13 AM
Can you please show the code of that UI action?
What type of UI action it is Server/Client?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2023 01:36 AM
Hi Prince
Currently UI action is in server side .
createStory();
function createStory(){
var grStry = new GlideRecord('rm_story');
grStry.short_description = "Fix: " + current.short_description;
grStry.description = "Source: " + current.number + '';
grStry.acceptance_criteria = '';
grStry.u_requestors = current.u_affected_user;
var taskSys = grStry.insert();
action.setRedirectURL(grStry);
action.setReturnURL(current);}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2023 02:42 AM
Can you try,
action.setRedirectURL("/rm_story.do?sys_id=" + grStry);
If my answer solved your issue, please mark my answer as ✅Correct & 👍Helpful based on the Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2023 03:05 AM
Hi Prince,
No it is not opening in new tab , Do you think we can control the Browser through Server side ? or should we first convert this to client side and then try ? I am not sure , have you done this before ?