GlideElement - setValue(Object value)

Sets the value of a field.

Table 1. Parameters
Name Type Description
value Object The value the field is to be set to.
Table 2. Returns
Type Description

Scoped equivalent

To use the setValue() method in a scoped application, use the corresponding scoped method: Scoped GlideElement - setValue(Object value).

// Using GlideElement.setValue (equivalent to GlideRecord.setValue)
gr.short_description.setValue('This is the short description.');
// Using GlideRecord.setValue
gr.setValue('short_description', 'This is the short description.');