Using getLink(true), I am getting Native UI pages, but I wnat ESC view.

Community Alums
Not applicable

I am using this code to get the link of any record:
var gr = new GlideRecord('sys_user');
gr.addQuery('active',true);
gr.query();
if(gr.next())
{
var link = gr.getLink(true);
gs.info(link);
}
But I want the link in ESC Portal view.
Kindly guide on the same.
Thanks

1 REPLY 1

Peter Bodelier
Giga Sage

Hi @Community Alums,

 

You will have to create the link yourself:

 

Depending on which page you're going to, you could use it as below.

 

var gr = new GlideRecord('sys_user');
gr.addQuery('active',true);
gr.query();
if(gr.next())
{
var link = './esc?id=hri_user_profile&sys_id='+gr.getUniqueValue();
gs.info(link);
}

 


Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.