π Client Side APIS and Methods Flashcards
What API is used to show qualified embedded help in the right sidebar?
& Is it ServerSide or ClientSide
The CustomEvent API
It is client side.
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
What does the CustomEvent API do?
Shows qualified embedded help in the right sidebar.
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
What API is the fireAll() method associated with?
The CustomEvent API
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
What needs to be done before using the fireAll() method?
Embedded Help qualifiers need to have been created before using the fireAll() method.
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
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?
The DynamicTranslation API.
Client Side.
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
What does the DynamicTranslation API do?
Provides methods that translate text, in real time, into multiple languages using translation service providers.
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
What are the translation service providers supported by the DynamicTranslation API as of the Vancouver release?
- Microsoft Azure Translator Service
- IBM Watson Translator Service
- Google Cloud Translator Service
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
Who / what environment(s) is the DynamicTranslation API available for?
- Standard Clients
- Angular-based Service Portal clients
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
While interacting with the DynamicTranslation API, when should you use the dynamicTranslation class and when should you use the DynamicTranslation class?
dynamicTranslation - Used for Service Portal clients
DynamicTranslation - Used for standard clients
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
How can you use the DynamicTranslation API in a Service Portal widget?
You must inject the dynamicTranslation service into the widget client script function.
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
What class is the getDetectedLanguage() method associated with
DynamicTranslation
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
What are the parameters passed for the getDetectedLanguage() method?
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
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?
g_service_catalog
Client side.
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
What environments is the g_service_catalog API available in?
All environments
Such as Service Portal, Now Platform, Workspace, and Now Mobile.
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
What does the g_service_catalog API do?
Enables you to access data in a multi-row variable set (MRVS) when a model is open.
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
What class is the getValue method associated with?
g_service_catalog
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
What does MRVS stand for and what does it mean?
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
What does the getValue() method do?
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
What API is used to enable a UI Action or client script to open a specified record in an Agent Workspace tab?
The GlideAgentWorkspace (g_aw) API.
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
What does the GlideAgentWorkspace (g_aw) API do?
Enables a UI Action or client script to open a specified record in an Agent Workspace tab.
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
What class is the closeRecord() method associate with?
the g_aw (GlideAgentWorkspace) class
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
What does the closeRecord() method do?
Closes the currently open record, such as a form, in a subtab within Agent Workspace.
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
What class is the openRecord() method associated with?
the g_aw (GlideAgentWorkspace) class
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
What does the openRecord() method do?
Opens a specific record, such as a form, in a subtub within Agent Workspace.
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
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
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
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
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
What class is the addParam() method associated with?
GlideAjax
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
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
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
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
What class is the getXMLAnswer() method associated with?
GlideAjax
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
What class is the getAnswer() method associated with?
GlideAjax
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
What class is the method getXML() associated with?
GlideAjax
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
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
What class is the method getXMLWait() associated with?
GlideAjax
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
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
What API is used to search DOM elements, search documents, or search JQuery elements?
The GlideDocument API.
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
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
What class is the getElement() method associated with?
GlideDocument (g_document)
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
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
What class is the getElements() method associated with?
GlideDocument(g_document)
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
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
What API is used for client-side interactions with actions, flows, and subflows?
GlideFlow
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
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
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
What API provides methods to customize forms?
The GlideForm API
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
What does the GlideForm API do?
Provides method to customize forms
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
How do you obtain data from fields within an MRVS (multi row variable set)?
First use
- JSON.parse(getValue(β<mrvs_field_name>ββ) || β[]β)
to obtain the MRVS array.
and then use indexing to access the fields within the row objects.</mrvs_field_name>
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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(β<mrvs_field_name>β)) 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.</mrvs_field_name>
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
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
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
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
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
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
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
What API is used to Create a globally unique identifier?
The GlideGuid API
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
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
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
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
What does the addFilter() method do?
Adds a single term to the list query filter.
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
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
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
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
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
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
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
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
What does the getOrderBy() method do?
Returns the first field used to order the list
βββββββββββββββββββββββ
π Client Side APIs and Methods Developer Documentation
What does the getParentTable() method do?
Returns the name of the parent table for a related list (the table associated with the form)
What does the getQuery() method do?
Returns the encoded query string for the list.
What does the getRelated() method do?
Returns the related list field that associated the related list to the parent form.
What does the getTableName() method do?
Returns the table name for the list.
What does the getView() method do?
Returns the view used to display the list.
What does the getTitle() method do?
Returns the list title.
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.
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.
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.
What does the setFilter() method do?
Sets the encoded query string for the list, ignoring the orderBy and groupBy parts of the query string.
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.
What does the setFirstRow() method do?
Sets the first row that appears in the list when the list is refreshed.
What does the setGroupBy() method do?
Sets the list groupBy criteria for a single field.
What does the setOrderBy() method do?
Sets the orderBy criteria for the list.
What does the setRowsPerPage() method do?
Sets the number of rows per page to display on a list.
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.
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.
What does the sort() method do?
Sorts the list in ascending order and sets the fields as an orderBy column.
What does the sortDescending() method do?
Sorts a single field in the list in descending order and sets the field as an orderByDescField column.
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.
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.
What API is used to customize UI Context Menu items?
& Server-Side or Client-Side?
GlideMenu
Client side
What does the GlideMenu API do?
Used to customize UI Context Menu items.
What does the clearImage() method do?
Clears the image for an item.
What does the clearSelected() method do?
Clears any selection images from items in the menu.
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.
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.
What does the setEnabled() method do?
Enables the specified menu item.
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.
What does the setImage() method do?
Sets an image for an item. (GlideMenu API)
What does the setLabel() method do?
Sets the display label for a menu item. The label may contain HTML.
What does the setvisible() method do?
Displays the specified item.
What API is used to display a form in a GlideModal?
GlideModalForm
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.
What does the GlideModalForm() method do?
Creates an instance of the GlideModalForm class
What does the addParm() method do in the context of the GlideModalForm class.
Sets the specified form field to the specified value.
What does the setSysID() method do in the context of the GlideModalForm class?
Sets the objectβs sys_id preference.
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.
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.
What does the render() method do in the context of the GlideModalForm class?
Shows the modal form.
Which of the following API should you use?
- GlideWindow
- GlideModal
- GlideDialogWindow
GlideModal - This is a fully-featured replacement for GlideWindow and GlideDialogWindow
What does the GlideModal API do?
Provides methods for displaying a content overlay.
What does the GlideModal() method do within the context of the GlideModal class?
Creates an instance of the GlideModalV3 class
What does the get() method do within the context of the GlideModal class?
Get a GlideModal object by ID
What does the getPreference() method do within the context of the GlideModal class?
Returns the value of the specified preference (property)
What does the render() method do within the context of the GlideModal class?
Renders the UI page in the modal.
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.
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.
What does the setPreferenceAndReload() method do within the context of the GlideModal class?
Set the properties and reload the modal.
What does the setTitle() method do within the context of the GlideModal class?
Sets the title of the modal.
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
What does the switchView() method do within the context of the GlideModal class?
Change the view and reload the modal.
What does the GlideNavigation API do?
Provides methods to control and refresh the navigator and main frame.
What API provides methods to control and refresh the navigator and main frame?
The GlideNavigation API
What does the open() method do within the context of the GlideNavigation API?
Redirects to a new URL
What does the openPopup () method do within the context of the GlideNavigation API?
Opens the specified URL in a popup window.
What does the openRecord() method do within the context of the GlideNavigation API?
Redirects to a record. The record displays in the navigator frame.
What does the refreshNavigator() method do within the context of the GlideNavigation API?
Refreshes the content in the navigator frame
What does the reloadWindow() method do within the context of the GlideNavigation API?
Reloads the current frame.
What does the GlideNotification API do?
Provides the ability to show messages over the page content.
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.
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.
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.
What does the addOrderBy() method do within the context of the client-side GlideRecord API?
Adds a column to order by in the query.
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)
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)
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.
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.
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.
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
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
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.
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.
What does the next() method do within the context of the client-side GlideRecord API?
Moves to the next record in the GlideRecord
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.
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.
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.
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.
Which API provides methods for manipulating a URI?
GlideURLV3
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.
What does the GlideURL() method do within the context of the client-side GlideURLV3 API?
Creates an instance of the GlideURL class.
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.
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
Which API provides access to to information about the current used ad current user roles?
The GlideUser API
What does the firstName property provide within the context of the GlideUser API?
Returns the current userβs first name.
What does the getClientData() method do within the context of the GlideUser API?
Returns a client value set.
What does the getFullName() method do within the context of the GlideUser API?
Returns the first and last name of the current user.
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.
What does the hasRoleExactly() method do within the context of the GlideUser API?
Determines whether the current user has the specified role.
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.
What does the hasRoles() method do within the context of the GlideUser API?
Returns true if the current user has any role.
What does the lastName property contain within the context of the GlideUser API?
The current userβs last name
What does the setClientData() method do within the context of the GlideUser API?
Sets a client value that you can retrieve ushering getClientData()
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.
What does the userID property contain within the context of the GlideUser API?
Returns the sys_id of the current user.
What API provides methods to get and format translated messages?
i18N API - Client Side
What does the i18N API do?
Provides methods to get and format translated messages.
What does the format() method do within the context of the i18N API?
Formats a string containing named tokens with values from a map.
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.
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.
What API is an omni-present frame the communication partners can use to integrate their systems into the ServiceNow platform?
The openFrameAPI - client side
What does the openFrameAPI do?
Openframeapi is an omni-present frame the communication partners can use to integrate their systems into the ServiceNow platform.
What does the hide() method do within the context of the openFrameAPI API?
Hides the OpenFrame in the TopFrame
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.
What does the isVisible () method do within the context of the openFrameAPI API?
Checks to see if the OpenFrame is visible in the TopFrame.
What does the openCustomURL() method do within the context of the openFrameAPI API?
Opens a custom URL in TopFrame
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.
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.
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
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
What does the setHeight() method do within the context of the openFrameAPI API?
Sets the OpenFrame height.
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.
What does the setPresenceIndicator() method do within the context of the openFrameAPI API?
Sets the presence indicator to display agent availability in the workspace.
What does the setSize() method do within the context of the openFrameAPI API?
Sets the OpenFrame size.
What does the setSubtitle() method do within the context of the openFrameAPI API?
Sets the OpenFrame subtitle.
What does the setTitle() method do within the context of the openFrameAPI API?
Sets the OpenFrame title.
What does the setTitleIcon() method do within the context of the openFrameAPI API?
Sets the OpenFrameβs title icon/
What does the setWidth() method do?
Sets the OpenFrame widht.
What does the show() method do within the context of the openFrameAPI API?
Makes the OpenFrame visible in the TopFrame
What does the subscribe() method do within the context of the openFrameAPI API?
Subscribes to the event
What does the version() method do within the context of the openFrameAPI API?
Returns the OpenFrame API version.