GlideElement - getHTMLValue(Number maxChars)

Returns the HTML value of a field.

Table 1. Parameters
Name Type Description
maxChars Number Optional. Maximum number of characters to return.
Table 2. Returns
Type Description
String HTLM value for the field.

Scoped equivalent

To use the getHTMLValue() method in a scoped application, use the corresponding scoped method: Scoped GlideElement - getHTMLValue(Number maxChars).

var inccause = new GlideRecord("incident");
inccause.short_description = current.short_description;
inccause.comments = current.comments.getHTMLValue();
inccause.insert();