Undefine Method
The Undefine method undefines a variable, object property, or value. Assume Siebel CRM defines a value, and then a defined method returns true for this value. If you use the Undefine method with this value, then the Is Defined method returns false. Undefining a value is not the same as setting a value to null.
The following example sets the n variable to 2, and then undefines the n variable:
var n = 2;
undefine(n);
This method is unique to Siebel eScript. For more information, see Make Sure the JavaScript Interpreter Can Run a Function.
Format
undefine(value)
The following table describes the arguments for the Undefine method.
Argument | Description |
---|---|
value |
The variable or object property that this method must undefine. |
Example
The following example creates an object named o, and then defines an o.one property. It then undefines this property but the o object remains defined:
var o = new Object;
o.one = 1;
undefine(o.one);