Thank you for your feedback.
Form temporarily unavailable. Please try again or contact to submit your comments.
  • Madrid
  • London
  • Kingston
  • Jakarta
  • Istanbul
  • Helsinki
  • Geneva
  • Store

Setting a GlideRecord variable to null

Log in to subscribe to topics and get notified when content changes.

Setting a GlideRecord variable to null

GlideRecord variables (including current) are initially null in the database. Setting these back to an empty string, a space, or the JavaScript null value will not result in a return to this initial state.

Note: This functionality requires a knowledge of JavaScript.
Note: Functionality described here requires the Admin role.

To set it back to the initial state, simply set the value to "NULL". Note that the update() function does not run on the current object but rather on the record. The object displays the initial value until it is called again from the record.

Example 1

var gr1 = new GlideRecord('incident');
while( { 
  gr1.priority = "NULL";

Example 2 (Business Rule)

current.u_affected_value = 'NULL';