Open an UI page when a button is clicked on form

Gowtham Kodali
Tera Contributor

Hi,

 

I have created a UI page and I created an UI action button on the form as well 

My requirement is when  the Form button is clicked it should open the UI page  in a  new Window is it possible 

Thank you

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Gowtham,

you can have client side UI action for this and sample script as below in it

This should open the UI page in the new tab

Onclick: openUIPage();

function openUIPage(){

var uiPageSysId = '0d9f357607b85c10540bf2508c1ed0f2'; // pass ui page sys_id here
var url = '/ui_page.do?sys_id=' + uiPageSysId;
g_navigation.open(url, '_blank');

}

Regards
Ankur

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

View solution in original post

7 REPLIES 7

asifnoor
Kilo Patron

Hi,

You can use GlideDialogWindow to open the UI page in a popup.

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Gowtham,

Try using Client side Ui action window.open('Pass url','_blank'); 

Reference: https://community.servicenow.com/community?id=community_question&sys_id=96e0bb35dbec3b405ed4a851ca96...

 

- Pradeep Sharma

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Gowtham,

you can have client side UI action for this and sample script as below in it

This should open the UI page in the new tab

Onclick: openUIPage();

function openUIPage(){

var uiPageSysId = '0d9f357607b85c10540bf2508c1ed0f2'; // pass ui page sys_id here
var url = '/ui_page.do?sys_id=' + uiPageSysId;
g_navigation.open(url, '_blank');

}

Regards
Ankur

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