How to pass sysid of the workspace page to ui page?

Uday_Kumar
Giga Guru

Hi @Ankur Bawiskar @Community Alums @AndersBGS  @Allen Andreas @Prince Arora @AnveshKumar M 

I need to pass the sysid of the workspace page to the ui page normally we use set preference in glidedialogwindow but in workspace ui actions we use g_modal. can anyone please help me out how to pass sys_id of the workspace page to ui page through workspace ui action script.

Uday_Kumar_0-1680777069250.png

Thanks in Advance

16 REPLIES 16

Ankur Bawiskar
Tera Patron
Tera Patron

@Uday_Kumar 

workspace page sysId?

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

@Ankur Bawiskar  when i open any incident then i need to pass sysid of that opened incident

Uday_Kumar_0-1680777446440.png

 

@Uday_Kumar 

okay it's record sysId

in that case you can use this in workspace client script

var recordSysId = g_form.getUniqueValue();

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

@Ankur Bawiskar 

function onClick(g_form) {
    var ui_page_id = '0719e6dd978221109d6933121153af44';
        g_modal.showFrame({
            url: '/ui_page.do?sys_id=' + ui_page_id,
            title: 'Assign',
            size: 's',
            height: 200,
			
        });
    

Ok but how to pass this in script and how can i use that in ui page @Ankur Bawiskar