Agent Workspace - UI Action to open a UI Page in a sub tab

German Alvarez2
Tera Expert

Hi Community!

In the Agent Workspace, I would like to place a UI Action in order to open a IU Page in a sub tab, or to show the results of a query, let's say the list of Incidents opened by the same user in the last three days in a subtab?

find_real_file.png

Does anyone knows how to make it possible?

Best Regards

6 REPLIES 6

Winston
Tera Guru

Hey sir, 

Try the g_aw.openRecord(). It's used in a few OOB UI actions to open new tabs in the workspace.

This one opens the Sys_user record of the caller in a new tab from a incident:

 

function onClick(g_form) {
g_aw.openRecord("sys_user",g_form.getValue("caller_id"), { "mode": "form" });
}

https://developer.servicenow.com/dev.do#!/reference/api/orlando/client/GlideAgentWorkspaceAPI#gaw-op...

I'm seeing a lot of use cases for sys_user but none for opening related tasks themselves. I checked and 'Copy Incident' seems to open a related incident, but I can't get this to work with g_aw.openRecord, does anyone know how to use this method to open task type records?