GlideAgentWorkspace (g_aw) - Client
The g_aw API provides methods that enable a UI action or client script to open a specified record in an Agent Workspace tab.
There is no constructor for this class. Access GlideAgentWorkspace methods using the g_aw global object.
GlideAgentWorkspace - closeRecord()
Closes the currently open record, such as a form, in a subtab within Agent Workspace.
| Name | Type | Description |
|---|---|---|
| None |
| Type | Description |
|---|---|
| None |
function onClick(g_form) {function onClick(g_form) {
g_form.save().then(function(){
g_aw.closeRecord();
});
}
GlideAgentWorkspace - openRecord(String table, String sysId, Object params)
Opens a specified record, such as a form, in a subtab within Agent Workspace.
| Name | Type | Description |
|---|---|---|
| table | String | Name of the table that contains the record to open. |
| sysId | String | Sys ID of the record to open. |
| params | Object | Optional. Name/value pairs of the parameters to pass to the
record. |
| params.readOnlyForm | Boolean | Flag that indicates whether all fields on the opened record are read-only;
regardless of the UI policy and ACLs.
Default: false |
| params.defaultTab | String | Name of the initial tab to display in the workspace. You can only specify
related items or related lists. If not specified, the details tab appears unless hideDetails is set to true. For more information on the method to use to obtain a related list name, see getRelatedListNames(). |
| params.hideDetails | Boolean | Flag that indicates whether to hide the details tab and the UI actions.
Default: false |
| Type | Description |
|---|---|
| None |
Open a sys_user record in a subtab.
g_aw.openRecord('sys_user', '62826bf03710200044e0bfc8bcbe5df1');
Open a record in a subtab where all fields are read-only.
g_aw.openRecord('sys_user', '62826bf03710200044e0bfc8bcbe5df1', {readOnlyForm: true});
Open a record in a subtab and go directly to the "Groups" related list.
g_aw.openRecord('sys_user', '62826bf03710200044e0bfc8bcbe5df1', {defaultTab: "sys_user_grmember.user"});
Open a record in a subtab but only show the form header and other tabs.
g_aw.openRecord('sys_user', '62826bf03710200044e0bfc8bcbe5df1', {hideDetails: true});