GlideSpScriptable Flashcards

1
Q

For Knowledge Articles, Service Catalogs and Categories, checks if the users can view the record in Server Script

A

$sp.canReadRecord(GlideRecord)

Or

$sp.canReadRecord(table, sys_id)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Checks if a user can see a page in Server Script

A

$sp.canSeePage(String pageID)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Returns the model for a Catalog Item in Server Script

A

$sp.getCatalogItem(String sysId, Boolean isOrdering)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Returns the display value of the specified field in Server Script

A

$sp.getDisplayValue(String fieldName)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Returns information about the specified field, including label, value, display value and type in Server Script

A

$sp.getField(GlideRecord now_GR, String fieldName)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Returns which fields are valid given an array of field names in Server Script

A

$sp.getFields(GlideRecord now_GR, String fieldNames)

Or

$sp.getFieldsObject(GlideRecord now_GR, String fieldNames)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Returns the form for a table and sys_id pair in Server Script

A

$sp.getForm(String tableName, String sysId)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Returns an array of KB Articles for a certain Category in Server Script

A

$sp.getKBCategoryArticles(String sys_id, Number limit)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Returns an array of KB Articles summaries for a certain Category and its Sub-categories in Server Script

A

$sp.getKBCategoryArticleSummaries(String sys_id, Number limit, Number maxChars)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Returns number of published, current Articles in a Knowledge Base in Server Script

A

$sp.getKBCount(String sys_id)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Returns a list of columns for the given table and view in Server Script

A

$sp.getListColumns(String tableName, String view)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Returns the parameters for a page in Server Script

A

$sp.getMenuHREF(GlideRecord page)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Returns the menu items for a specified menu instance in Server Script

A

$sp.getMenuItems(String sysId)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Retrieve a parameter from the URL in Server Script

A

$sp.getParameter(String name)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Get current Service Portal in Server Script

A

$sp.getPortalRecord()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Returns a record specified by the URL in Server Script

A

$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.

17
Q

Returns a record specified by a table, sys_id pair in Server Script

A

$sp.getRecord(String table, String sys_id)

18
Q

Copies display values for the specified fields of a GlideRecord into the data parameter in Server Script

A

$sp.getRecordDisplayValues(Object data, GlideRecord from, String names)

19
Q

Copies the element’s name, display value, and value for the specified fields of a GlideRecord into the data parameter in Server Script

A

$sp.getRecordElements(Object data, GlideRecord from, String names)

20
Q

Copies the value for the specified fields of a GlideRecord into the data parameter in Server Script

A

$sp.getRecordValues(Object data, GlideRecord from, String names)

21
Q

Returns the Service Catalog Variables associated with a record in Server Script

A

$sp.getRecordVariables(GlideRecord now_GR, Boolean includeNilResponses)

Or

$sp.getRecordVariablesArray(GlideRecord now_GR, Boolean includeNilResponses)

22
Q

Returns the activity stream for the specified record in Server Script

A

$sp.getStream(String table, String sysId)

23
Q

Returns the user’s initials in Server Script

A

$sp.getUserInitials()

24
Q

Returns the named value of the JSON request, instance, or portal in Server Script

A

$sp.getValue(String name)

25
Q

Copies values from the JSON request, instance or portal to the data parameter in Server Script

A

$sp.getValues(Object data, String names)

26
Q

Returns an array of Service Catalog variables associated with the record in the URL in Server Script

A

$sp.getVariablesArray(Boolean includeNilResponses)

27
Q

Gets a widget by id or sys_id. Excecutes the widgets server script with provided options and returns the widget in Server Script

A

$sp.getWidget(String sysID, Object options)

28
Q

Tranforms a platform bound URL to a Service Portal URL in Server Script

A

$sp.mapUrlToSPUrl(String url)