Class: Action

Action

Describes options to present to the user on the table to take an action on a specific row.

This exists only for documentation purposes and is not actually defined in the instance.


new Action()

Source:

Members


action :String

Indicating how interactions with this action should process.

Specific actions that are available:

  • link or newlink go to a URL. newlink doing so in a new window or tab
  • form-modal opens a modal on the page with a form view. Every key's value is filled in for the object passed to the modal. This action also uses several specific extra key values; table, sys_id, and view to specify the form to open. These values are template completed before being invoked.
  • ajax-call makes an AJAX call similar to a GlideAjax call. This action also fills out the key values for all keys on the object and then passes each key as a parameter in the AJAX call. The tbl_class is used to initialize the SPGlideAjax instance and tbl_method is specifically added as the "sysparm_name" parameter of the AJAX call. Both keys can also be specified specifically as a key:value pair on the row's data that can be completed for a more dynamic AJAX call. Additionally, a tbl_complete key is used for a switch case that can be either redirect or newwindow and will use the new_url key to open or redirect once a response is received. However, as a note, deeply nested data will NOT get replacements.
Type:
  • String
Source:

ajax_class :String

Only for the ajax-call action. Specifies the class on which to initialize the GlideAjax.

Type:
  • String
Source:

ajax_complete :String

Only for the ajax-call action. Optional specification of an action to take once the call is complete.

Possible values:

  • redirect
  • newwindow
Type:
  • String
Source:

ajax_method :String

Only for the ajax-call action. Specifies the method to invoke on the Script Include.

Type:
  • String
Source:

classes :String

CSS classes to apply to the button itself for styling. A good class to use here would be the Service-Now button classes, such as "btn btn-info" or similar.

Type:
  • String
Source:

condition :Object

Optional object describing values that have to match for the action to display

Type:
  • Object
Source:

icon :String

With classes specifically for rendering an icon. This will generally follow font-awesome 4.7 or another glyph set included on your portal

Type:
  • String
Source:

label :String

For the displayed text

Type:
  • String
Source:

perform :String

Only for the link or newlink action, this specifies the URL. Template tokens here are replaced by the data rows' values.

Type:
  • String
Source:

sys_id :String

Only for the form-modal action. Specifies the sys_id of the record to open in the form.

Type:
  • String
Source:

table :String

Only for the form-modal action. Specifies the table against which the form should open.

Type:
  • String
Source:

title :String

Used for hover text (HTML title property) on the button

Type:
  • String
Source:

view :String

Only for the form-modal action. Specifies the view to use for the record in the modal.

Type:
  • String
Source: