Opening in new Tab/Window through UI action

Not applicable

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. 

2 ACCEPTED SOLUTIONS

@Community Alums ,

 

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.

View solution in original post

@Community Alums ,

 

This can be converted, please check the checkbox of client and follow the instructions as mentioned in below screenshot:

 

PRINCE_ARORA_0-1679483343329.png

 

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.

 

 

View solution in original post

8 REPLIES 8

Prince Arora
Tera Sage

@Community Alums ,

 

Can you please show the code of that UI action?

What type of UI action it is Server/Client?

Not applicable

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);}

@Community Alums ,

 

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. 

Not applicable

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 ?