To create a document
The following steps create a document, complete with content and properties. The content must be specified as a string. Almost any data with a text/* MIME type is possible: for example, text/plain, text/html, text/xml. The object is filed into the specified folder.
NOTE Content Extended Operations are available for the Component step only.
- destFolder: A folder in which to create the new document.
- className: A string containing the class name to use for the new document.
NOTE When using CE_Operations, the create operations will fail if the Document class Display name contains spaces.
- propArray: Properties for the new custom object. For the specified document property, you must create three elements within the array: the document's symbolic name, data type and value. An example:
{"DocumentTitle", "STRING", "New Expense Report",
"FirstName", "STRING", fName,
"LastName", "STRING", IName}When specifying a value for a non-string property, you must convert the value to a string in order to place it within the array. For example:
{"DocumentTitle", "STRING", "New Loan Application",
"LoanAmount", "DOUBLE", numbertostring(loanAmt),
"AppDate", "DATETIME", timetostring(appDate)
"SpecialLoan", "BOOLEAN", convert(spclLoan, string)}You cannot modify multi-valued properties using a properties array. To modify multi-valued
properties, you must use the setMulti<type>Property operations.The following table describes the possible data types, as well as which function you should use for converting each type to a string.
Data Type Conversion function BOOLEAN convert(bool_value, string) DATETIME timetostring(time_value) DOUBLE numbertostring(float_value) INTEGER numbertostring(int_value) OBJECT convert(attachment, string)
fileName: A string containing the file name of the new document.
- mimeType: A string containing the MIME type for any new content.
- content: A string containing the content of the new version. For new lines, use "\n".
- document: The new document.
To create a folder
The following steps create a folder, either at the root of the object store or as a child of an attached folder.
- parentFolderAttr: Attachment pointing to the parent location of the new folder. If the desired location of the child folder is at the top of the object store, specify "||0|3|peru|". This represents an empty attachment.
- className: Folder class to use for the new folder.
- propArray: Properties for the new folder. Note that FolderName must be set.
For the specified document property, you must create three elements within the array: the document's symbolic name, data type and value. An example:
{"FolderName", "STRING", "Foo"}
- folder: The new folder object.
To create a custom object
The following steps create a custom object using a specified class, and property values. The object is filed into the specified folder.
- destFolder: Destination folder.
- className: Custom object class to use for the new custom object.
- propArray: Properties for the new custom object.
- customObject: The new document.