dms.XMLUpdate
This job modifies the specified object. A folder, cabinet or document can be updated. If the object to be inserted is a document, file paths can be passed to the file list. Whether these files replace the existing ones or are appended to them is determined by the option REPLACEFILES.
Documents can be made into reference documents, as long as they don’t have files. This is done by setting the system field 'Foreign ID' (and possibly System ID). For reference documents, the same applies: they can be made into documents again by clearing the Foreign ID (and possibly System ID). This is done by setting the system fields using the 'field_function' attribute with the value 'NULL'.
By specifying the system field 'Owner', the owner can be changed. However, this cannot be specified using the GUID, but must correspond to the username.
If the 'concurrency_timestamp' attribute in the Object tag is filled with a value, it is checked whether the data record has changed since the last retrieval by the caller, and an error is returned. This prevents changes made between retrieval and the desired change from being lost.
By default, rows from table controls are appended to existing data. If the 'line' attribute is set with a row number in the <Row> element, the corresponding row is updated. Row numbering is 1-based. If the job option REPLACETABLEFIELDS is set, all existing rows are completely replaced with the new data.
The job option REPLACEREMARKS determines whether all existing notes and connections are deleted when creating notes or connections, or whether notes and connections are added (Default). 'RemarkText' and 'RemarkObject' have the 'action' attribute with the following values: INSERT (Default), DELETE, UPDATE, UPDATE_TEXT, UPDATE_COLOR. Existing notes are identified by ID (remark_id), connections by object ID and object type ID of the linked object.
1. Input Parameters
| Name | Type | Required | Description |
|---|---|---|---|
|
INT |
Yes |
general options for the job (see Flags) |
|
STRING |
Yes |
semicolon-separated job options (e.g. ARCHIVABLE=1;CHECKACCESS=0) (see Parameter Options) |
|
BASE64 |
Yes |
contains object description in XML format (see DMSData XML Format and the parameter XML) |
|
STRING |
Yes |
determines the user context (see the parameter JobUserGUID) |
2. Input Files
| Name | Description |
|---|---|
|
Path and name of the modified document |
|
Nth file path as alternative to file list |
3. Return Value
(INT): 0 = Job successful, otherwise error code
Complete list of error codes
No job-specific return values.
| The following XML examples always contain all tags and tag attributes that can be used for the respective action. Unused tags or attributes can naturally be omitted. |
<?xml version="1.0" encoding="UTF-8"?>
<DMSData>
<Archive id="-1" internal_name="press_archive">
<ObjectType id="-1" internal_name="press_archive_folder" type="FOLDER">
<Object object_id="54">
<Fields>
<Field system="0" internal_name="subject_area">Softwareentwicklung</Field>
<Field dbname="feld2" system="0">Testbenutzer</Field>
</Fields>
<TableFields>
<TableField dbname="Tabelle" system="0">
<Row>
<Field internal_name="designation">Dokumentation</Field>
</Row>
</TableField>
</TableFields>
<Remarks>
<RemarkText action="INSERT" color="WHITE">A note for the folder.</RemarkText>
<RemarkObject action="INSERT" object_id="123" object_type="196616">Link text</RemarkObject>
</Remarks>
</Object>
</ObjectType>
</Archive>
</DMSData>
<?xml version="1.0" encoding="UTF-8"?>
<DMSData>
<Archive id="-1" internal_name="press_archive">
<ObjectType id="-1" internal_name="year_2004" type="REGISTER">
<Object object_id="78">
<Fields>
<Field system="0" internal_name="category">Neuentwicklung</Field>
</Fields>
<TableFields>
<TableField internal_name="table_topics">
<Row>
<Field internal_name="topic">Dokumentenmanagement</Field>
</Row>
</TableField>
</TableFields>
<Remarks>
<RemarkText action="INSERT" color="WHITE">A note for the cabinet.</RemarkText>
<RemarkObject action="INSERT" object_id="234" object_type="196616">Link text</RemarkObject>
</Remarks>
</Object>
</ObjectType>
</Archive>
</DMSData>
<?xml version="1.0" encoding="UTF-8"?>
<DMSData>
<Archive id="-1" internal_name="press_archive">
<ObjectType id="-1" maintype="4" cotype="0" internal_name="word_documents" type="DOCUMENT">
<Object object_id="221" register_id="-1" variantparent_id="-1" maintype="0">
<Fields>
<Field system="0" internal_name="author">Testuser</Field>
</Fields>
<MultiFields>
<MultiField system="0" osguid="2AED8A3399EE778DS4ECBFDB582">
<Page id="1">
<Value>345</Value>
</Page>
<Page id="2">
<Value>123</Value>
</Page>
</MultiField>
</MultiFields>
<TableFields>
<TableField name="Tabelle">
<Row>
<Field name="Team">Development</Field>
<Field internal_name="feld2">Status: released</Field>
</Row>
</TableField>
<TableField osguid="AAED8A3C99EED78DS4ECBFDB586">
<Row>
<Field dbname="fd1">Year 2004</Field>
</Row>
</TableField>
</TableFields>
<Remarks>
<RemarkText action="INSERT" color="BLUE">A note for the document.</RemarkText>
<RemarkObject action="INSERT" object_id="432" object_type="196616">Link text</RemarkObject>
</Remarks>
</Object>
</ObjectType>
</Archive>
</DMSData>