GlideSysListControl - Scoped

The scoped GlideSysListControl class allows you to determine if the New or Edit buttons are displayed.

GlideSysListControl - getControlID()

Returns the sys_id for the control.

Table 1. Parameters
Name Type Description
None
Table 2. Returns
Type Description
String sys_id of the control

var sysListCtrl = new GlideSysListControl("incident");
var controlID = sysListCtrl.getControlID();
gs.info(controlID);

Output:

91a807a60a0a3c74012113e28b47ca2e

GlideSysListControl - GlideSysListControl(String tableName)

Instantiates a GlideSysListControl object.

Table 3. Parameters
Name Type Description
tableName String Name of the table


      
      

Output:

GlideSysListControl - isOmitEditButton()

Returns true if the edit button is not displayed.

Table 4. Parameters
Name Type Description
None
Table 5. Returns
Type Description
Boolean True when the edit button is not displayed.

var sysListCtrl = new GlideSysListControl("incident");
var isOmitted = sysListCtrl.isOmitEditButton();
gs.info(isOmitted);

Output:

false

GlideSysListControl - isOmitNewButton()

Returns true when the New button is not displayed.

Table 6. Parameters
Name Type Description
None
Table 7. Returns
Type Description
Boolean True when the new button is not displayed.

var sysListCtrl = new GlideSysListControl("incident");
var isOmitted = sysListCtrl.isOmitNewButton();
gs.info(isOmitted);

Output:

false