π 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