Siebel eScript Language Reference > Siebel eScript Commands > Conversion Methods >

ToObject() Method


This function converts its parameter to an object.

Syntax

ToObject(value)

Parameter
Description

value

The value to be converted to an object

Returns

A value that depends on value's original data type, according to the following table.

Data Type
Returns

Boolean

A new Boolean object having the value value

null

Generates a run-time error

number

A new Number object having the value value

object

value

string

A new string object having the value value

undefined

Generates a run-time error

Usage

This function converts its parameter to an object.

CAUTION:  The ToObject() function is unique to Siebel eScript. Before using it, confirm that the JavaScript interpreter that will run the script supports Siebel eScript functions. Avoid using this function in a script that may be used with a JavaScript interpreter that does not support it.

See Also

ToString() Method

Siebel eScript Language Reference