Using UI Action I want to open a Catalog Item in New Window

Priya Gautum
Kilo Guru

Hi All

Can you please let me know how can we open a catalog Item in a new window by clicking on UI Action.

I wrote-

var queryString = '/com.glideapp.servicecatalog_cat_item_view.do?sysparm_id=8dde7c2c4f5bea008ec7bc218110c7c4';

action.setRedirectURL(queryString);

but it is opening in the same window.

Regards,

Pragati

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Priya,

Are you using client side UI action or server side?

If you are using client side then this is possible;

window.open('your url','_blank');

if server side then it seems difficult

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

8 REPLIES 8

Anurag Tripathi
Mega Patron
Mega Patron

Hii Pragati,

 

You can use this javascript functiuon to do the same

window.open(url,'_blank');

 


-Anurag

-Anurag

Hi Anurag

Can you please explain a bit more how can we use this.

It is not working for me.

This is a client sid code, so your ui action needs to be client=true

and build the url and pass it in the first parameter in below

window.open(url,'_blank');

 

_blank here tells it to open in a new tab , it is the target argument

-Anurag

-Anurag

Hi,

Just checking in of this worked or not?

-Anurag

-Anurag