Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Call UI page through UI action button

Aman Trivedi1
Tera Contributor

How to call a UI Page through UI action button and converting that UI page to pdf format and download as an pdf.

 

2 REPLIES 2

Shamma Negi
Kilo Sage
Kilo Sage

This is how you can call UI Page from UI action

 

  1. function popupDispList() {
  2. var gdw = new GlideDialogWindow('UI page name');
  3. gdw. setTitle('Incidents');
  4. gdw. setPreference('table', 'incident_list');
  5. gdw. setPreference('sysparm_view', 'default');
  6. gdw. render();

Hope this helps.

Please mark this answer helpful and correct if this helps you.

Regards,Shamma Negi

I am successful to call a UI Page through below script but I need to to download that

UI Page into pdf format. whenever a user click on a button.

 

function openUIPage() {

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

}