GlideForm Flashcards
How do you invoke the GlideForm object?
g_form.someFunction()
What overall functionality does GlideForm provide?
These methods are used to make custom changes to the form view of records.
Is GlideForm client side or server side?
Client Side
Adds an icon on a field’s label in Client Script
g_form.addDecoration(String fieldName, String icon, String title)
OR
g_form.addDecoration(String fieldName, String icon, String title, String color)
Displays the specified error message at the top of the form in Client Script
g_form.addErrorMessage(String message)
Adds the specified informational message to the top of the form in Client Script
g_form.addInfoMessage(String message)
Adds a choice to the end of a choice list field in Client Script
g_form.addOption(String fieldName, String choiceValue, String choiceLabel)
Adds a choice to the choice list field at the position specified in Client Script
g_form.addOption(String fieldName, String choiceValue, String choiceLabel, Number choiceIndex)
Removes all informational and error messages from the top of the form in Client Script
g_form.clearMessages()
Removes all options from the choice list in Client Script
g_form.clearOptions(String fieldName)
Removes any value(s) from the field in Client Script
g_form.clearValue(String fieldName)
Prevents file attachments from being added to the form in Client Script
g_form.disableAttachments()
Allows file attachments to be added to the form in Client Script. Shows the paper clip icon.
g_form.enableAttachments()
Used to draw attention to a particular field. Flashes the specified color for a specified duration of time in the specified field in Client Script.
g_form.flash(String fieldName, String color, Number count)
This method is not supported by Service Catalog.
Returns the most recent action name, or, for a client script, the sys_id of the UI action clicked in Client Script
g_form.getActionName()
Returns a Boolean value for the specified field in Client Script
g_form.getBooleanValue(String fieldName)
Returns the HTML element for the specified field in Client Script
g_form.getControl(String fieldName)
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.
If the field is a reference field and the control is a choice list, getControl() may not return a control as expected. In this case, use sys_select…
Returns the decimal value of the specified field in Client Script
g_form.getDecimalValue(String fieldName)
Returns the HTML element specified by the parameter in Client Script
g_form.getElement(String id)
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.
Returns the HTML element for the form in Client Script
g_form.getFormElement()
Returns the HTML element of the help text for the specified field in Client Script
g_form.getHelpTextControl(String fieldName)
This method is applicable to service catalog variables only.
Returns the integer value of the field in Client Script
g_form.getIntValue(String fieldName)
Returns the plain text value of the field label in Client Script
g_form.getLabelOf(String fieldName)
Returns the option element for a selected box named fieldName where choiceValue matches the option value in Client Script
g_form.getOption(String fieldName, String choiceValue)
This method does not work on read-only fields.