GlideSpScriptable Flashcards
For Knowledge Articles, Service Catalogs and Categories, checks if the users can view the record in Server Script
$sp.canReadRecord(GlideRecord)
Or
$sp.canReadRecord(table, sys_id)
Checks if a user can see a page in Server Script
$sp.canSeePage(String pageID)
Returns the model for a Catalog Item in Server Script
$sp.getCatalogItem(String sysId, Boolean isOrdering)
Returns the display value of the specified field in Server Script
$sp.getDisplayValue(String fieldName)
Returns information about the specified field, including label, value, display value and type in Server Script
$sp.getField(GlideRecord now_GR, String fieldName)
Returns which fields are valid given an array of field names in Server Script
$sp.getFields(GlideRecord now_GR, String fieldNames)
Or
$sp.getFieldsObject(GlideRecord now_GR, String fieldNames)
Returns the form for a table and sys_id pair in Server Script
$sp.getForm(String tableName, String sysId)
Returns an array of KB Articles for a certain Category in Server Script
$sp.getKBCategoryArticles(String sys_id, Number limit)
Returns an array of KB Articles summaries for a certain Category and its Sub-categories in Server Script
$sp.getKBCategoryArticleSummaries(String sys_id, Number limit, Number maxChars)
Returns number of published, current Articles in a Knowledge Base in Server Script
$sp.getKBCount(String sys_id)
Returns a list of columns for the given table and view in Server Script
$sp.getListColumns(String tableName, String view)
Returns the parameters for a page in Server Script
$sp.getMenuHREF(GlideRecord page)
Returns the menu items for a specified menu instance in Server Script
$sp.getMenuItems(String sysId)
Retrieve a parameter from the URL in Server Script
$sp.getParameter(String name)
Get current Service Portal in Server Script
$sp.getPortalRecord()
Returns a record specified by the URL in Server Script
$sp.getRecord(String table, String sys_id)
Returns null if the widget is embedded by another widget, or if the record for the provided parameters is not found.
Returns a record specified by a table, sys_id pair in Server Script
$sp.getRecord(String table, String sys_id)
Copies display values for the specified fields of a GlideRecord into the data parameter in Server Script
$sp.getRecordDisplayValues(Object data, GlideRecord from, String names)
Copies the element’s name, display value, and value for the specified fields of a GlideRecord into the data parameter in Server Script
$sp.getRecordElements(Object data, GlideRecord from, String names)
Copies the value for the specified fields of a GlideRecord into the data parameter in Server Script
$sp.getRecordValues(Object data, GlideRecord from, String names)
Returns the Service Catalog Variables associated with a record in Server Script
$sp.getRecordVariables(GlideRecord now_GR, Boolean includeNilResponses)
Or
$sp.getRecordVariablesArray(GlideRecord now_GR, Boolean includeNilResponses)
Returns the activity stream for the specified record in Server Script
$sp.getStream(String table, String sysId)
Returns the user’s initials in Server Script
$sp.getUserInitials()
Returns the named value of the JSON request, instance, or portal in Server Script
$sp.getValue(String name)
Copies values from the JSON request, instance or portal to the data parameter in Server Script
$sp.getValues(Object data, String names)
Returns an array of Service Catalog variables associated with the record in the URL in Server Script
$sp.getVariablesArray(Boolean includeNilResponses)
Gets a widget by id or sys_id. Excecutes the widgets server script with provided options and returns the widget in Server Script
$sp.getWidget(String sysID, Object options)
Tranforms a platform bound URL to a Service Portal URL in Server Script
$sp.mapUrlToSPUrl(String url)