The following parameters apply to the createObject method:
|
Parameter |
Type |
Description |
|---|---|---|
|
SID |
Integer |
Identifies the session retrieved from logging in. |
|
ObjectType |
String |
Identifies the type of object to create (the majic factory name). |
|
attrVals |
String[] |
Identifies a sequence of name-value pairs used to set the initial attribute values for the new issue. Note: Dotted names are not permitted. |
|
attributes |
String[] |
Identifies a sequence of attribute names from the new object for which to return values. Dot-notation is permitted. If this field is empty, all attribute values are returned. |
|
createObjectResult |
String Holder |
Identifies the String Holder object for capturing returned data. See the XML Element Return list below for details. |
|
newHandle |
String Holder |
Identifies the String Holder object for capturing returned data. See the XML Element Return list below for details. |
Description
Creates a CA SDM object. The caller is responsible for setting any required fields in the attrVals parameter. Dotted-names are not permitted.
Identifies the name for an object type (factory).
Describes the array of name-value pairs used to initialize the new object. For example, the following pseudo-code shows how to create a contact and return a <UDSObject> element with values for all its attributes:
String [4] attrVals;
attrVals[0] = “first_name”; // attribute name
attrVals[1] = “Edgar”;
attrVals[2] = “last_name”;
attrVals[3] = “Martin”;
string [0] emptyArray;
CreateObject(sid, “cnt”, attrVals, emptyArray, createObjectReturn, newHandle);
Note: Do not use this method for new assets, issues, requests, or change orders. Use the specialized createXXX() methods for those object types. This comment also applies if you are using the ITIL methodology—use the appropriate methods to create Configuration Items, Incidents, and Problems.
Returns
A <UDSObject> element containing the new objects handle, along with attribute values specified in the attributes parameter. If the attributes parameter is empty, all attribute values are returned. List and LREL types are also returned, but as empty elements.
|
XML Element |
Type |
Description |
|---|---|---|
|
<createObjectResult> |
N/A |
Identifies the standard UDSObject element containing the handle and requested attribute values. |
|
<newHandle> |
String |
Identifies the new objects handle. |
|
Copyright © 2013 CA.
All rights reserved.
|
|