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.

GlideModal in Agent Workspace UI Action

Nitesh Balusu
Giga Guru

How do I add make this also work in a UI Action in Agent Workspace? I want to render this UI page pop-window in workspace as well.

 

 

 

function openAttachmentModal() {
    var sys_id = g_form.getUniqueValue();
    var modal = new GlideModal('sn_hr_core_some_ui_page');
    modal.setPreference('sysparm_sys_id', sys_id);
    modal.setTitle('some title');
    modal.render();
}

 

 

 

1 ACCEPTED SOLUTION

Nitesh Balusu
Giga Guru

Figured it out

 

function onClick(g_form) {

var sys_id = g_form.getUniqueValue();

g_modal.showFrame({title: 'some title', url: 'sn_hr_core_some_ui_page?sysparm_sys_id=' + sys_id + '&sysparm_type=interaction', size:'lg'});

}

View solution in original post

3 REPLIES 3

Nitesh Balusu
Giga Guru

Figured it out

 

function onClick(g_form) {

var sys_id = g_form.getUniqueValue();

g_modal.showFrame({title: 'some title', url: 'sn_hr_core_some_ui_page?sysparm_sys_id=' + sys_id + '&sysparm_type=interaction', size:'lg'});

}

By chance, did you get a way to close this opened window?

How should I receive this parameter in UI page?

eg:sysparm_sys_id