Develop > Programming Guide > JavaScript and Service Manager reference > Service Manager defined JavaScript objects

Service Manager defined JavaScript objects

The defined objects are unique to the implementation of JavaScript within HPE Service Manager. This is a complete list of the Service Manager defined objects.

Defined object Description
Attachment This object allows you to create attachments for use with doSOAPRequest methods.
Datum This object extracts aggregate types of data (structures or arrays) from a record in the file object. In Service Manager, a file record is a datum and so is each component of the record.
SCDatum This object converts a Datum to a SCDatum so that you can test the results by using the return codes. When an object is initialized in RAD and then passed to JavaScript, the object becomes a Datum object and all the methods return true/false values. If an error occurs and you want a more specific error message, you can create a SCDatum object from the Datum object.
SCFile This object constructs a new file object. You can use the SCFile object to access, update, and move between Service Manager files. This object exposes a small set of frequently used return code constants that make it easy to test values returned by methods without having to hard code return code values in the script.
SCRecordList This object is an array of Datums that qualify with the query. SCRecordList has two available functions: getPosition() and getCount().
Query This object returns an array of records. The Query object cannot be used to write data back to Service Manager.
QueryCond This object defines the conditions of the query. It is used in conjunction with the Query object to define the parameters for returning data from Service Manager.
XML This object represents an XML document or a node in an XML document. Underlying the XML object is the Document Object Model (DOM) object. You may find that in certain instances the XML object in Service Manager is not compliant with the DOM binding for JavaScript.
XMLDate

This object makes it possible to do conversions between three kinds of datetime values. These include the following constructors:

  • XMLDate( dateobject ): passes a JavaScript Date object to the constructor.
  • XMLDate( iso8601datetimeordurationstring ): passes an XML schema date, time, datetime, or duration string to the constructor.
  • XMLDate( datetimedatum ): a Service Manager datum object of type TIME to the constructor.

Note In ServiceCenter version 6.1, the File and SCDoc objects are deprecated. HPE strongly recommends that you do not use these objects since they may be removed in a future release.