Scoped GlideElementDescriptor - isVirtual()

Returns true if the element is a virtual element.

A virtual element is a calculated field as set by the dictionary definition of the field. Virtual fields cannot be encrypted.

Table 1. Parameters
Name Type Description
None
Table 2. Returns
Type Description
Boolean Returns true if the element is a virtual element.
var grInc = new GlideRecord('incident');
grInc.query('priority', '1');

var field = grInc.getElement('priority');
var ed = field.getED();

var isVirtual = ed.isVirtual();
gs.info(isVirtual);

Output: false