πŸ“ Client Side APIS and Methods Flashcards

1
Q

What API is used to show qualified embedded help in the right sidebar?

& Is it ServerSide or ClientSide

A

The CustomEvent API
It is client side.

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
πŸ“ Client Side APIs and Methods Developer Documentation

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

What does the CustomEvent API do?

A

Shows qualified embedded help in the right sidebar.

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
πŸ“ Client Side APIs and Methods Developer Documentation

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

What API is the fireAll() method associated with?

A

The CustomEvent API

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
πŸ“ Client Side APIs and Methods Developer Documentation

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

What needs to be done before using the fireAll() method?

A

Embedded Help qualifiers need to have been created before using the fireAll() method.

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
πŸ“ Client Side APIs and Methods Developer Documentation

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

What API is used to provide methods that translate text, in real time, into multiple languages using translation service providers?

& Is it Server Side or Client Side?

A

The DynamicTranslation API.
Client Side.

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
πŸ“ Client Side APIs and Methods Developer Documentation

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

What does the DynamicTranslation API do?

A

Provides methods that translate text, in real time, into multiple languages using translation service providers.

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
πŸ“ Client Side APIs and Methods Developer Documentation

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

What are the translation service providers supported by the DynamicTranslation API as of the Vancouver release?

A
  • Microsoft Azure Translator Service
  • IBM Watson Translator Service
  • Google Cloud Translator Service

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
πŸ“ Client Side APIs and Methods Developer Documentation

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

Who / what environment(s) is the DynamicTranslation API available for?

A
  • Standard Clients
  • Angular-based Service Portal clients

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
πŸ“ Client Side APIs and Methods Developer Documentation

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

While interacting with the DynamicTranslation API, when should you use the dynamicTranslation class and when should you use the DynamicTranslation class?

A

dynamicTranslation - Used for Service Portal clients

DynamicTranslation - Used for standard clients

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
πŸ“ Client Side APIs and Methods Developer Documentation

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

How can you use the DynamicTranslation API in a Service Portal widget?

A

You must inject the dynamicTranslation service into the widget client script function.

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
πŸ“ Client Side APIs and Methods Developer Documentation

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

What class is the getDetectedLanguage() method associated with

A

DynamicTranslation

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
πŸ“ Client Side APIs and Methods Developer Documentation

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

What are the parameters passed for the getDetectedLanguage() method?

A

getDetectedLanguage(text, parms)
where text = string passed and evaluated to detect language
& parms = optional JSON object that contains additional translation parameters.

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
πŸ“ Client Side APIs and Methods Developer Documentation

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

What API is used to access data in a multi-row variable set (MRVS) when a model is open?
& is it Server side or Client side?

A

g_service_catalog
Client side.

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
πŸ“ Client Side APIs and Methods Developer Documentation

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

What environments is the g_service_catalog API available in?

A

All environments
Such as Service Portal, Now Platform, Workspace, and Now Mobile.

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
πŸ“ Client Side APIs and Methods Developer Documentation

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

What does the g_service_catalog API do?

A

Enables you to access data in a multi-row variable set (MRVS) when a model is open.

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
πŸ“ Client Side APIs and Methods Developer Documentation

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

What class is the getValue method associated with?

A

g_service_catalog

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
πŸ“ Client Side APIs and Methods Developer Documentation

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

What does MRVS stand for and what does it mean?

A

Multi-Row Variable Set
a handy way to enter multiple rows as part of a Service Catalog request.

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
πŸ“ Client Side APIs and Methods Developer Documentation

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

What does the getValue() method do?

A

Returns the value of the specified field on the catalog item form when used in a client script on multi-row variable sets (MRVS).

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
πŸ“ Client Side APIs and Methods Developer Documentation

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

What API is used to enable a UI Action or client script to open a specified record in an Agent Workspace tab?

A

The GlideAgentWorkspace (g_aw) API.

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
πŸ“ Client Side APIs and Methods Developer Documentation

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

What does the GlideAgentWorkspace (g_aw) API do?

A

Enables a UI Action or client script to open a specified record in an Agent Workspace tab.

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
πŸ“ Client Side APIs and Methods Developer Documentation

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

What class is the closeRecord() method associate with?

A

the g_aw (GlideAgentWorkspace) class

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
πŸ“ Client Side APIs and Methods Developer Documentation

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

What does the closeRecord() method do?

A

Closes the currently open record, such as a form, in a subtab within Agent Workspace.

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
πŸ“ Client Side APIs and Methods Developer Documentation

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

What class is the openRecord() method associated with?

A

the g_aw (GlideAgentWorkspace) class

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
πŸ“ Client Side APIs and Methods Developer Documentation

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

What does the openRecord() method do?

A

Opens a specific record, such as a form, in a subtub within Agent Workspace.

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
πŸ“ Client Side APIs and Methods Developer Documentation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
In what context is the openRecord() method able to be used?
This method is only available in the Agent Workspace client scripting environment or in a UI action on the workspace client script field β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
26
What API is used to enable a client script to call server-side code in a script include?
The GlideAjax API. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
27
What does the GlideAjax API do?
The GlideAjax class enables a client script to call server-side code in a script include. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
28
What are the general steps to use GlideAjax?
- 1: Create a GlideAjax instance by calling the GlideAjax constructor. As the argument to the constructor, specify the name of the script include class the contains the method you want to call. - 2: Call the addParam method with the sysparm_name parameter and the name of the script-include method you want to call. - 3: (Optional) Call the addParam method one or more times to provide the script-include code with other parameters it needs. - 4: Execute the server-side code by calling getXML() β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
29
What class is the addParam() method associated with?
GlideAjax β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
30
What does the addParam() method do?
Specifies a parameter name and value to be passed to the server-side function associated with this GlideAjax object. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
31
What does the getAnswer() method do?
Retrieves the results from a server-side method called from the client via the getXMLWait() method. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
32
What does the getXMLAnswer method do?
Calls the processor asynchronously and gets the answer element of the response in XML format. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
33
What class is the getXMLAnswer() method associated with?
GlideAjax β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
34
What class is the getAnswer() method associated with?
GlideAjax β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
35
What class is the method getXML() associated with?
GlideAjax β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
36
What does the method getXML() do?
Sends the server a request to execute the method and parameters associated with this GlideAjax object. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
37
What class is the method getXMLWait() associated with?
GlideAjax β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
38
What does the method getXMLWait() do?
Sends the server a request to execute the method and parameters associated with this GlideAjax object. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
39
What API is used to search DOM elements, search documents, or search JQuery elements?
The GlideDocument API. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
40
What does the GlideDocument (g_document) API do?
Provides the ability to search a DOM element, a document, or a JQuery element. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
41
What class is the getElement() method associated with?
GlideDocument (g_document) β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
42
What does the getElement() method do?
Returns a node found in the specified DOM based context or created from the HTML context. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
43
What class is the getElements() method associated with?
GlideDocument(g_document) β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
44
What does the getElements() method do?
Returns a node list found in the specified DOM based context or created if an HTML context is specified. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
45
What API is used for client-side interactions with actions, flows, and subflows?
GlideFlow β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
46
What is the GlideFlow API used for and what are some of the things that can be done with it?
Use the GlideForm JavaScript API for client-side interactions with actions, flows, and subflows. Using this API you can: - Start actions, flows, or subflows via a script - Get an existing execution - Get the status and any available outputs - Wait for the completion of an action, flow, or subflow β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
47
What is a *promise* in the context of an API returning *promise* objects?
A promise represents the eventual result of an asynchronous operation. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
48
What API provides methods to customize forms?
The GlideForm API β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
49
What does the GlideForm API do?
Provides method to customize forms β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
50
What does the addDecoration() method do within the context of the GlideForm API?
Adds an icon on a field’s label β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
51
What does the addErrorMessage() method do within the context of the GlideForm API?
Displays the specified error message at the top of the form This messages appears for approximately four seconds and then disappears. This timeout is not configurable at this time. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
52
What does the addFormMessage() method do within the context of the GlideForm API?
Displays a floating form message at the top of the form detail section. This message does not cover UI actions. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
53
What does the addInfoMessage() method do within the context of the GlideForm API?
Adds the specified informational message to the top of the form. This message appears for approximately four seconds. This timeout is not configurable at this time. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
54
What does the addOption() method do within the context of the GlideForm API?
Adds a choice to the end of a choice list field by default. If adding the parameter choice index, then it adds a choice to the list field at the position specified. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
55
What does the clearMessages() method do within the context of the GlideForm API?
Removes only informational and error messages from the top of the form. Removes informational and error messages added with addInfoMessage() and addErrorMessage() β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
56
What’s the difference between the clearMessages() method and the clearAllFormMessages() method within the context of the GlideForm API?
clearMessages() affects informational and error messages (populated using the addInfoMessage() and addErrorMessage() methods), while clearAllFormMessages() removes form messages of any type. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
57
What does the clearAllFormMessages() method do within the context of the GlideForm API?
Removes all form messages of any type. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
58
What does the clearOptions() method do within the context of the GlideForm API?
Removes all options from the choice list. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
59
What does the clearValue() method do within the context of the GlideForm API?
Removes any value(s) from the field. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
60
What does the disableAttachments() method do within the context of the GlideForm API?
Prevents file attachments from being added. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
61
What does the enableAttachments() method do within the context of the GlideForm API?
Allows file attachments to be added. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
62
What does the flash() method do within the context of the GlideForm API?
Used to draw attention to a particular field. Flashes the specified color for a specified duration of time in the specified field. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
63
What does the getActionName() method do within the context of the GlideForm API?
Returns the most recent action name, or, for a client script, the sys_id or the UI action clicked. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
64
What does the getBooleanValue() method do within the context of the GlideForm API?
Returns a boolean value for the specified field. Returns false if the field value is false or undefined, otherwise returns true. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
65
What does the getControl() method do within the context of the GlideForm API?
Returns the HTML element for the specified field. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
66
What does the getDecimalValue() method do within the context of the GlideForm API?
Returns the decimal value of the specified field. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
67
What does the getDisplayBox() method do within the context of the GlideForm API?
Gets the display value from a form in the core UI. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
68
What does the getDisplayValue() method do within the context of the GlideForm API?
Gets the display value from a form in Service Portal. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
69
What does the getElement() method do within the context of the GlideForm API?
Returns the HTML element specified by parameter. Compound fields may contain several HTML elements. This method is generally not necessary as there are built-in methods that use the fields on a form. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
70
What does the getFormElement() method do within the context of the GlideForm API?
Returns the HTML element for the form β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
71
What does the getHelpTextControl() method do within the context of the GlideForm API?
Returns the HTML element of the help text for the specified field. This method is applicable to service catalog variables only. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
72
What does the getIntValue() method do within the context of the GlideForm API?
Returns the integer value of the field specified β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
73
What does the getLabelOf() method do within the context of the GlideForm API?
Returns the plain text value of the field label. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
74
What does the getOption() method do within the context of the GlideForm API?
Returns the option element for a selected box named *fieldName* where *choiceValue* matches the option value. getOption(fieldName, choiceValue) NOTE: This method does not work on read-only fields. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
75
What does the getReference() method do within the context of the GlideForm API?
Returns the GlideRecord for a specified field. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
76
Why is using a callback function with the getReference() method so important within the context of the GlideForm API?
If a callback function is not present, the routine runs synchronously and processing halts (causing the browser to appear to hang) while waiting on a server response. If a callback function is present, the routine runs asynchronously. The browser (and script) processing continues normally until the server returns the reference value, at which time, the callback function is invoked. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
77
What does the getRelatedListNames() method do within the context of the GlideForm API?
Returns an array of related list names from the current form β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
78
What does the getSections() method do within the context of the GlideForm API?
Returns an array of the form’s sections. This method is not available in the mobile platform. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
79
What does the getTableName() method do within the context of the GlideForm API?
Returns the name of the table to which record belongs. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
80
What does the getUniqueValue() method do within the context of the GlideForm API?
Returns the sys_id of the record displayed in the form. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
81
What does the getValue() method do within the context of the GlideForm API?
Returns the value of the specified form field. This method also supports values from a multi-row variable set (MRVS). β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
82
How do you obtain data from fields within an MRVS (multi row variable set)?
First use - JSON.parse(getValue(β€˜β€™β€™) || β€˜[]’) to obtain the MRVS array. and then use indexing to access the fields within the row objects. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
83
What does the hideAllFieldMsgs() method do when passed no parameters within the context of the GlideForm API?
Hides all field messages. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
84
What does the hideAllFieldMsgs() method do when passed a String type parameter within the context of the GlideForm API?
Hides all field messages of the specified type (the string parameter) β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
85
What does the hideErrorBox() method do within the context of the GlideForm API?
Hides the error message placed by showErrorBox() Whenever possible, use hideFieldMsg() rather than this method. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
86
What does the hideFieldMsg() method do when its second parameter is passed as true within the context of the GlideForm API? What if it is passed as false or not included?
hideFieldMsg(String fieldName, Boolean clearAll) When the clearAll parameter is true, all messages for the field are cleared. When false, only the last message is removed. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
87
What does the hideRelatedList() method do within the context of the GlideForm API?
Hides the specified related list on the form. This method is not available on the mobile platform. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
88
What does the hideRelatedLists() method do within the context of the GlideForm API?
Hides all related lists on the form. This method is not available on the mobile platform. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
89
What does the isLiveUpdating() method do within the context of the GlideForm API? What is an example of how this could be used?
Returns true while a live update is being done on the record the form is showing. This can be used in an onChange() client script to determine if a change to the record is because of a live update from another session. The client script can then device what action to take, or not to take. This applies to systems using Core UI with live forms enabled. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
90
What does the isMandatory() method do within the context of the GlideForm API?
Returns true if the field is mandatory β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
91
What does the isNewRecord() method do within the context of the GlideForm API?
Returns true if the record has never been saved? β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
92
What does the isSectionVisible() method do within the context of the GlideForm API?
Returns true if the section is visible The isSectionVisible() method is not supported in Workspace β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
93
What does the onUserChangeValue() method do within the context of the GlideForm API?
Registers a custom event listener that detects when any field in the current form is modified by a user. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
94
What does the refreshSlushbucket() method do within the context of the GlideForm API?
You can update a list collector variable. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
95
What does the removeOption() method do within the context of the GlideForm API?
Removes the specified option from the choice list. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
96
What does the removeDecoration() method do within the context of the GlideForm API?
Removes the icon from the specified field that matches the icon and title. This method is not supported by Service Catalog. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
97
What does the save() method do within the context of the GlideForm API?
Saves the record without navigating away (update and stay). β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
98
What does the setMandatory() method do within the context of the GlideForm API?
Makes the specified field mandatory. Whenever possible, use a UI policy rather than this method. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
99
What does the setDisplaySection() method do within the context of the GlideForm API?
Shows or hides a section. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
100
What does the setValue() method do within the context of the GlideForm API?
Sets the value of a specified form field to the value of a specified display value in a reference record β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
101
What is important to remember about performance and the parameters in regards to the setValue() method within the context of the GlideForm API?
setValue(String fieldName, String value, String displayValue) Neglecting to pass information to the displayValue parameter could result in a round trip and thus decrease performance. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
102
What is something important to remember when using the setValue() method to set multiple reference values for a list collector field within the context of the GlideForm API?
Pass arrays into the parameters. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
103
What is something important to remember about using the setValue() method in OnChange client scripts within the context of the GlideForm API?
The setValue() method can cause a stack overflow when used in an OnChange client script. This is because every time the value is set, it will register as a change, which may re-trigger the OnChange client script. To prevent this, perform a check that will validate that the new value will be different from the old value.d β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
104
What does the showErrorBox() method do within the context of the GlideForm API?
Displays an error message under the specified form field (either a control object or the name of the field). If the control or field is currently off the screen and the scroll form parameter is true, the form scrolls to the control or field. A global property (glide.ui.scroll_to_message_field) is available that controls automatic message scrolling when the form field is off screen (scrolls the form to the control or field). The showFieldMsg() method is a similar method that requires a type parameter. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
105
What does the showFieldMsg() method do within the context of the GlideForm API?
Displays either an informational or error message under the specified form field (either a control object or the name or the field.) If the control or field is off the screen, the form is scrolled to the field. A global property (glide.ui.scroll_to_message_field) is available that controls automatic message scrolling when the form field is off screen (scrolls the form to the control or field) The showErrorBox() method is a shorthand method that does not require the type parameter. This method does not work with the journal_field type field in Core UI. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
106
What does the setDisabled() method do within the context of the GlideForm API?
Makes the specified field available or unavailable β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
107
What does the setDisplay() method do within the context of the GlideForm API?
Displays or hides a field. This method cannot hide a mandatory field with no value. If the field is hidden, the space is used to display other items. Whenever possible, use a UI policy instead of this method. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
108
What does the setLabelOf() method do within the context of the GlideForm API?
Sets the plain text value of the field label. This method is not supported by Service Catalog β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
109
What does the setReadOnly() method do within the context of the GlideForm API?
Makes the specified field read-only or editable. Whenever possible, use a UI policy instead of this method. To make a mandatory field read-only, you cannot use the setValue() method to update the value of that field. If you need to set the value in this way, you must set the readOnly value to false. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
110
What does the setValue() method do within the context of the GlideForm API?
Sets the value of a specified form field to the passed in value. This method also supports setting values in multi-row variable sets (MRVS). You must first use JSON.parse(getValue(β€˜β€™)) to obtain the MRVS array and then use indexing to update the fields within the row objects. Once all values are updates in the MRVS, use the setValue() method to save the update MRVS array. Note: The method setValue() can cause a stack overflow when used in an OnChange client script. This is because every time the value is set, it will register as a change, which may re-trigger the OnChange client script. To prevent this, perform a check that will validate that the new value will be different from the old value. For example, before performing setValue(shortDesc, newValue.toUpperCase());, validate that the short description is not already uppercase. This will prevent the client script from applying the toUpperCase() more than once. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
111
What does the setVisible() method do within the context of the GlideForm API?
Displays or hides the field. This method cannot hide mandatory fields with no value. Use UI Policy rather than this method whenever possible. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
112
What does the showErrorBox() method do within the context of the GlideForm API?
Displays an error message under the specified form field (either a control object or the name of the field) If the control or field is currently off the screen, the form scrolls to the control or field. A global property (glide.ui.scroll_to_message_field) is available that controls automatic message scrolling when the form field is off the screen (scrolls the form to the control or field) the showFieldMsg() method is a similar method that requires a type parameter. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
113
What does the showRelatedList() method do within the context of the GlideForm API?
Displays the specified related list on the form. This method is not available on the mobile platform. If this method is run on a mobile platform, no action occurs. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
114
What does the showRelatedLists() method do within the context of the GlideForm API?
Displays all the form’s related lists.This method is not available on the Mobile platform. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
115
What does the submit() method do when there is no parameter passed within the context of the GlideForm API?
Saves the record. The user is taken away from the form, returning them to where they were. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
116
What does the submit(String verb) method do when it is passed a parameter within the context of the GlideForm API?
Performs the UI action specified by the parameter. Where *String* above is an β€œaction_name from a sys_ui_action record The action name must be for a visible form button.” β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
117
What API is used to Create a globally unique identifier?
The GlideGuid API β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
118
What does the GlideGuid API do?
It create a globally unique identified 32 characters long, or as specified with the optional length argument β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
119
What API is used to manipulate lists?
GlideList2 GlideListV3 Depreciated GlideList (Now Experience) Not applicable to core UI β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
120
What does the GlideList2 API do?
GlideList2 is a JavaScript class used to customize (v2) lists. The variable g_list is used to access a specified list object. The g_list variable is not available to the related lists form link UI action. It is available to the lists form link UI action. These methods are used in UI Context Menus and UI Actions β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
121
What does the addFilter() method do?
Adds a single term to the list query filter. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
122
Which API should you use 98% of the time? - GlideList (Now Experience) - GlideList2 - GlideListV3
- GlideList2 - GlideListV3 is depreciated - GlideList (Now Experience) is only applicable to working within the Now Experience β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
123
What does the get() method do when passed an object DOMelement?
Returns the GlideList2 object for the list that contains the specified item. The DOMelement parameter, of the object type, is the DOM element ID for the list for which you want the GlideList2 object. It either returns an object or returns null β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
124
What does the get() method do when pass a String ListID?
Returns the GlideList2 object for the list specified. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
125
What does the getChecked() method do?
Returns a comma-separated list of the sys_ids for the items that are checked in the associated list. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
126
What does the getFixedQuery() method do?
Returns the fixed query. A fixed query is the part of the query that cannot be removed from the breadcrumb (ie, it is fixed for the user). It is specified by including a sysparm_fixed_query parameter for the application module. β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
127
What does the getGroupBy() method do?
Returns the field or comma-separated list of fields that are used to group the list β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
128
What does the getListName() method do?
Returns the name of the list, which is usually the table name β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
129
What does the getOrderBy() method do?
Returns the first field used to order the list β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ“ Client Side APIs and Methods Developer Documentation
130
What does the getParentTable() method do?
Returns the name of the parent table for a related list (the table associated with the form)
131
What does the getQuery() method do?
Returns the encoded query string for the list.
132
What does the getRelated() method do?
Returns the related list field that associated the related list to the parent form.
133
What does the getTableName() method do?
Returns the table name for the list.
134
What does the getView() method do?
Returns the view used to display the list.
135
What does the getTitle() method do?
Returns the list title.
136
What does the isUserList() method do?
Returns *true* if the list has been personalized by the user by choosing the list mechanic and changing the list layout.
137
What does the refresh() method do?
Refreshes the list. The orderBy part of the list filter is ignored so that the list uses its natural ordering when it is refreshed.
138
What does the refreshedWithOrderBy() method do?
Refreshes the list. The orderBy part of the list filter is included if it is specified for the list.
139
What does the setFilter() method do?
Sets the encoded query string for the list, ignoring the orderBy and groupBy parts of the query string.
140
What does the setFilterAndRefresh() method do?
Sets the encoded query string for the list, including the orderBy and groupBy if specified, and then refreshes the list using the new filter.
141
What does the setFirstRow() method do?
Sets the first row that appears in the list when the list is refreshed.
142
What does the setGroupBy() method do?
Sets the list groupBy criteria for a single field.
143
What does the setOrderBy() method do?
Sets the orderBy criteria for the list.
144
What does the setRowsPerPage() method do?
Sets the number of rows per page to display on a list.
145
What does the showHideGroups() method do?
Shows or hides all the groups within the list and saves the current collapsed/expanded state of the groups as a user preference.
146
What does the showHideList() method do?
Displays or hides the list and saves the current collapsed/expanded state of the list as a user preference.
147
What does the sort() method do?
Sorts the list in ascending order and sets the fields as an orderBy column.
148
What does the sortDescending() method do?
Sorts a single field in the list in descending order and sets the field as an orderByDescField column.
149
What does the toggleList() method do?
Toggles the display of the list and saves the current collapsed/expanded state of the list as a user preference.
150
What does the toggleListNoPref() method do?
Toggles the display of the list but does not save the current collapsed/expanded state of the list as a user preference.
151
What API is used to customize UI Context Menu items? & Server-Side or Client-Side?
GlideMenu Client side
152
What does the GlideMenu API do?
Used to customize UI Context Menu items.
153
What does the clearImage() method do?
Clears the image for an item.
154
What does the clearSelected() method do?
Clears any selection images from items in the menu.
155
What does the getItem() method do?
Returns a menu item by item ID. It can be necessary to find an item in a menu so that it can be changed before being displayed. Each menu item may be assigned a unique ID when the menu item is created.
156
What does the setDisable() method do?
Disables a menu item so that it cannot be selected. The disabled menu items is displayed in a lighter color (grayed out) to indicate it was disabled.
157
What does the setEnabled() method do?
Enables the specified menu item.
158
What does the setHidden() method do?
Hides the specified menu item. When hiding menu items, the separator bars are not adjusted, so it is possible to end up with the menu showing two separators in a row.
159
What does the setImage() method do?
Sets an image for an item. (GlideMenu API)
160
What does the setLabel() method do?
Sets the display label for a menu item. The label may contain HTML.
161
What does the setvisible() method do?
Displays the specified item.
162
What API is used to display a form in a GlideModal?
GlideModalForm
163
What does the GlideModalForm API do?
Displays a form in a GlideModal General usage of the GlideModalForm class involves creating the object, setting any preferences, and then rendering the GlideModalForm.
164
What does the GlideModalForm() method do?
Creates an instance of the GlideModalForm class
165
What does the addParm() method do in the context of the GlideModalForm class.
Sets the specified form field to the specified value.
166
What does the setSysID() method do in the context of the GlideModalForm class?
Sets the object’s sys_id preference.
167
What does the setCompletionCallback() method do in the context of the GlideModalForm class?
Sets the function to be called when the form has been successfully submitted and processed by the server.
168
What does the setOnloadCallback() method do in the context of the GlideModalForm class?
Sets the function to be called after the form has been loaded.
169
What does the render() method do in the context of the GlideModalForm class?
Shows the modal form.
170
Which of the following API should you use? - GlideWindow - GlideModal - GlideDialogWindow
GlideModal - This is a fully-featured replacement for GlideWindow and GlideDialogWindow
171
What does the GlideModal API do?
Provides methods for displaying a content overlay.
172
What does the GlideModal() method do within the context of the GlideModal class?
Creates an instance of the GlideModalV3 class
173
What does the get() method do within the context of the GlideModal class?
Get a GlideModal object by ID
174
What does the getPreference() method do within the context of the GlideModal class?
Returns the value of the specified preference (property)
175
What does the render() method do within the context of the GlideModal class?
Renders the UI page in the modal.
176
What does the renderWithContent() method do within the context of the GlideModal class?
Display a modal with the specified HTML content. The renderWithContent() method replaces the render() method, and does not request a UI page to render.
177
What does the setPreference() method do within the context of the GlideModal class?
Sets the specified field on the current form to the specified value.
178
What does the setPreferenceAndReload() method do within the context of the GlideModal class?
Set the properties and reload the modal.
179
What does the setTitle() method do within the context of the GlideModal class?
Sets the title of the modal.
180
What does the setWidth() method do within the context of the GlideModal class?
Sets the width in pixels The modal is boxed into predefined system sizes
181
What does the switchView() method do within the context of the GlideModal class?
Change the view and reload the modal.
182
What does the GlideNavigation API do?
Provides methods to control and refresh the navigator and main frame.
183
What API provides methods to control and refresh the navigator and main frame?
The GlideNavigation API
184
What does the open() method do within the context of the GlideNavigation API?
Redirects to a new URL
185
What does the openPopup () method do within the context of the GlideNavigation API?
Opens the specified URL in a popup window.
186
What does the openRecord() method do within the context of the GlideNavigation API?
Redirects to a record. The record displays in the navigator frame.
187
What does the refreshNavigator() method do within the context of the GlideNavigation API?
Refreshes the content in the navigator frame
188
What does the reloadWindow() method do within the context of the GlideNavigation API?
Reloads the current frame.
189
What does the GlideNotification API do?
Provides the ability to show messages over the page content.
190
What does the show() method do within the context of the GlideNotification API?
Displays the specified string over the page content as the specified type of message. When the duration timer expires, the message is removed.
191
What does the Client-Side GlideRecord API do?
GlideRecord is used for database operations and interactions. Client-side GlideRecord is not supported in scoped applications. Instead, use GlideAjax, or use REST APIs.
192
What does the GlideRecord() method do within the context of the client-side GlideRecord API?
Creates an instance of the GlideRecord class for the specified table.
193
What does the addOrderBy() method do within the context of the client-side GlideRecord API?
Adds a column to order by in the query.
194
What does the addQuery() method do within the context of the client-side GlideRecord API?
Adds a query to return records where the specified field name is equal to a specified value (or is in a list of values)
195
What does the addQuery() method do within the context of the client-side GlideRecord API when it is passed an operator parameter?
Adds a filter to return records where the field meets the specified condition (field, operator, value)
196
What does the deleteRecord() method do within the context of the client-side GlideRecord API?
Deletes the current record and calls the specified response function when complete.
197
What does the get() method do within the context of the client-side GlideRecord API?
Executes a GlideRecord query for a record with the specified sys_id. This method is expected to be used to query for single records, so a next operation is performed before returning.
198
What does the getEncodedQuery() method do within the context of the client-side GlideRecord API?
Retrieves the query condition of the current result set as an encoded query string.
199
What does the getLimit() method do within the context of the client-side GlideRecord API?
Returns the limit for records to be returned by the GlideRecord query
200
What does the getTableName() method do within the context of the client-side GlideRecord API?
Retrieves the name of the table associated with this GlideRecord
201
What does the hasNext() method do within the context of the client-side GlideRecord API?
Determines if there are any more records in the GlideRecord, returns true if there is.
202
What does the insert() method do within the context of the client-side GlideRecord API?
Inserts a new record using the field values that have been set for the current record.
203
What does the next() method do within the context of the client-side GlideRecord API?
Moves to the next record in the GlideRecord
204
What does the orderBy() method do within the context of the client-side GlideRecord API?
Specifies an orderBy column. May be called more than once to order by multiple columns.
205
What does the query() method do within the context of the client-side GlideRecord API?
Runs the query to the server against the table based on the addQuery() filter. This method queries the GlideRecord table as well as any references of the table. Do not make synchronous query calls. Performing a query without a response function makes the call synchronous, which means that the display will wait for the query response before continuing.
206
What does the setEncodedQuery() method do within the context of the client-side GlideRecord API?
Adds a specified encoded query string to the current query clause. This method enables you to specify complex filters (encoded query strings) in a single query call, unlike other client-side addQuery() methods. Once you define all the desired queries, call the query() method to execute the specified query clause (filter). If you call this method multiple times before calling the query() method, the queries are AND’ed together.
207
What does the setLimit() method do within the context of the client-side GlideRecord API?
Sets the limit for how many records are in the GlideRecord.
208
Which API provides methods for manipulating a URI?
GlideURLV3
209
What does the GlideURLV3 API do?
Provides methods for manipulating a URI. Can be used in client-side scripts using ListV2 and ListV3 APIs This API is not supported by Service Portal, Now Mobile, or Agent Workspace.
210
What does the GlideURL() method do within the context of the client-side GlideURLV3 API?
Creates an instance of the GlideURL class.
211
What does the addParam() method do within the context of the client-side GlideURLV3 API?
Adds a query string name-value pair to the URL.
212
What does the getURL() method do within the context of the client-side GlideURLV3 API?
Gets the entire context path and query string parameters as a single URI
213
Which API provides access to to information about the current used ad current user roles?
The GlideUser API
214
What does the firstName property provide within the context of the GlideUser API?
Returns the current user’s first name.
215
What does the getClientData() method do within the context of the GlideUser API?
Returns a client value set.
216
What does the getFullName() method do within the context of the GlideUser API?
Returns the first and last name of the current user.
217
What does the hasRole() method do within the context of the GlideUser API?
Returns true if the current user has the specified role or the admin role.
218
What does the hasRoleExactly() method do within the context of the GlideUser API?
Determines whether the current user has the specified role.
219
What does the hasRoleFromList() method do within the context of the GlideUser API?
Returns true if the current user has at least one of the specified roles or has the admin role.
220
What does the hasRoles() method do within the context of the GlideUser API?
Returns true if the current user has any role.
221
What does the lastName property contain within the context of the GlideUser API?
The current user’s last name
222
What does the setClientData() method do within the context of the GlideUser API?
Sets a client value that you can retrieve ushering getClientData()
223
What does the userName property contain within the context of the GlideUser API?
This property is the current user’s username, not the user’s name.
224
What does the userID property contain within the context of the GlideUser API?
Returns the sys_id of the current user.
225
What API provides methods to get and format translated messages?
i18N API - Client Side
226
What does the i18N API do?
Provides methods to get and format translated messages.
227
What does the format() method do within the context of the i18N API?
Formats a string containing named tokens with values from a map.
228
What does the getMessage() method do within the context of the i18N API?
Retrieves a translated message. If the specified string exists in the database for the current language, then the translated message is returned. If the specified string does not exist for the current language, then the English version of the string is returned. If the string does not exist at all in the database, then the ID itself is returned.
229
What does the getMessages() method do within the context of the i18N API?
Retrieves a set of messages. If the specified string exists in the database for the current language, then the translated message is returned. If the specified string does not exist for the current language, then the English version of the string is returned. If the string does not exist at all in the database, then the ID itself is returned.
230
What API is an omni-present frame the communication partners can use to integrate their systems into the ServiceNow platform?
The openFrameAPI - client side
231
What does the openFrameAPI do?
Openframeapi is an omni-present frame the communication partners can use to integrate their systems into the ServiceNow platform.
232
What does the hide() method do within the context of the openFrameAPI API?
Hides the OpenFrame in the TopFrame
233
What does the init () method do within the context of the openFrameAPI API?
Initialize OpenFrame, must be the first method called. This method initialized communication to TopFrame and initializes and visual elements passed in the config parameter.
234
What does the isVisible () method do within the context of the openFrameAPI API?
Checks to see if the OpenFrame is visible in the TopFrame.
235
What does the openCustomURL() method do within the context of the openFrameAPI API?
Opens a custom URL in TopFrame
236
What does the openServiceNowForm() method do within the context of the openFrameAPI API?
Opens a form URL. When an agent receives an incoming call, the OpenFrame window displays information such as the account, contact, or consumer. Clicking a link in the OpenFrame window displays the corresponding record. In the platform interface, this API opens a form URL in TopFrame. For Agent Workspace, this API supports interaction tab management. In Agent Workspace, an interaction record opens in a parent tab and the specified entity record opens in a child tab under the interaction tab.
237
What does the openServiceNowFormwithChildTabIf() do within the context of the openFrameAPI API?
Opens a ServiceNow form with a child tab if invoked in a workspace or opens an entity if invoked in the UI16 interface.
238
What does the openServiceNowList() do within the context of the openFrameAPI API?
Opens a list URL in TopFrame This API is not supported on Agent Workspace
239
What does the setFrameMode() method do within the context of the openFrameAPI API?
Sets the OpenFrame mode. The mode passed in this API: - sets the appropriate icon in the header: collapse or expand - raises the relevant event for CTI: - β€”openFrameAPI.EVENTS.COLLAPSE - β€”openFrameAPI.EVENTS.EXPAND
240
What does the setHeight() method do within the context of the openFrameAPI API?
Sets the OpenFrame height.
241
What does the setIcons() method do within the context of the openFrameAPI API?
The OpenFrame header can include icons that are placed next to the close icon.
242
What does the setPresenceIndicator() method do within the context of the openFrameAPI API?
Sets the presence indicator to display agent availability in the workspace.
243
What does the setSize() method do within the context of the openFrameAPI API?
Sets the OpenFrame size.
244
What does the setSubtitle() method do within the context of the openFrameAPI API?
Sets the OpenFrame subtitle.
245
What does the setTitle() method do within the context of the openFrameAPI API?
Sets the OpenFrame title.
246
What does the setTitleIcon() method do within the context of the openFrameAPI API?
Sets the OpenFrame’s title icon/
247
What does the setWidth() method do?
Sets the OpenFrame widht.
248
What does the show() method do within the context of the openFrameAPI API?
Makes the OpenFrame visible in the TopFrame
249
What does the subscribe() method do within the context of the openFrameAPI API?
Subscribes to the event
250
What does the version() method do within the context of the openFrameAPI API?
Returns the OpenFrame API version.