toString()
The content in this help topic applies to SuiteScript 2.0 and SuiteScript 2.1.
Method Description |
Method used to determine an object’s type. This is a global method that is loaded by default for all native SuiteScript 2.x API objects.
Note:
Consider this method a replacement for the instanceOf operator (which is not supported). SuiteScript 2.x members are immutable; you cannot construct or modify a native SuiteScript 2.x member. Consequently, if you attempt to call instanceOf, an undefined error is thrown. For information about |
Returns |
The object type as a string |
Supported Script Types |
Client and server scripts |
Governance |
None |
Since |
2015.2 |
Syntax
The following code snippet shows the syntax for this member. It is not a functional example.
...
var type = mapContext.toString(); // When called on mapReduce.MapContext, toString returns "mapReduce.MapContext"
...