UpdateFileField

Description

This service updates a specified File field on an item using a specified transition.

Arguments

Argument Type Description
auth (optional) Auth The Auth type supplies credentials and optionally, a host name for licensing. The userId and password can be specified with HTTP BASIC or WS-SECURITY instead.
itemId (required) ItemIdentifier Specifies the item that contains the File field.
fieldId (required) FieldIdentifier Specifies the File field.
transitionId (optional) TransitionIdentifier Specifies the transition to use to update the File field. If not specified, the system Update transition is used.
deleteAll (optional) boolean Clears the contents of a File field. Default is false. If set to true, all other settings in the call are ignored.
breakLock (optional) boolean Determines if the transition should run regardless if an item is locked or not. Default is true.
alwaysTrans (optional) boolean If set to true, this runs the transition even if the File field was not changed. Default is false.
includefile (optional) boolean Controls whether or not the file contents are included with the response.
fileObject (optional)

FileObj

Holds identification for one or more files and enables you to add, update, or delete files in the File field.
fileIdentifier (optional) Identifier Holds generic information about a file. Used to specify which files to return if there are multiple files.

Response

FieldObjectResponse is returned. See FieldObjectHolder.

Usage

This call updates a File field within the scope of a transition.

Note: The Maximum File Size setting in the Settings | Attachments tab in SBM System Administrator determines the size limit for file attachments that you can add to an item. The default maximum size is 500 MBs. However, use caution when adding or updating large files manually or in an automated manner, as this can negatively impact system performance.

Set includefile to false to return metadata about the files and not the file contents.

Note: If one or more files are included in the response, the cumulative total of all files that are returned is limited to 50 MB in size. If the total size of the included files is greater than 50 MB in size, you will only receive the meta data about the file attachments in the response. To change the size limit for all files in the response, see solution S142607.

Use fileObject to add, update, or delete specific files in the specified File field. See FileObj.

Faults

XML

The following XML is a snippet of the payload that is sent with UpdateFileField.

<urn:UpdateFileField>
    <urn:auth>
        <urn:userId>bill</urn:userId>
        <urn:password></urn:password>
        <urn:hostname></urn:hostname>
        <urn:loginAsUserId></urn:loginAsUserId>
    </urn:auth>
    <urn:itemId>
        <urn:displayName></urn:displayName>
        <urn:id>140</urn:id>
        <urn:uuid></urn:uuid>
        <urn:tableId>1012</urn:tableId>
        <urn:tableIdItemId></urn:tableIdItemId>
        <urn:issueId></urn:issueId>
    </urn:itemId>
    <urn:fieldId>
        <urn:displayName></urn:displayName>
        <urn:id></urn:id>
        <urn:uuid></urn:uuid>
        <urn:dbName>MULTI_FILE</urn:dbName>
    </urn:fieldId>
    <urn:transitionId>
        <urn:displayName></urn:displayName>
        <urn:id></urn:id>
        <urn:uuid></urn:uuid>
        <urn:internalName></urn:internalName>
    </urn:transitionId>
    <urn:deleteAll>false</urn:deleteAll>
    <urn:breakLock>true</urn:breakLock>
    <urn:alwaysTrans>false</urn:alwaysTrans>
    <urn:includefile>true</urn:includefile> 
    <urn:fileObject>
        <urn:id></urn:id>
        <urn:uuid></urn:uuid>
        <urn:name>sample text</urn:name>
        <urn:action>NEW-UPDATE</urn:action>
        <urn:filename></urn:filename>
        <urn:contentsBase64>
            <urn:data>SGVsbG8gV29ybGQ=</urn:data>
        </urn:contentsBase64>
    </urn:fileObject>
    <urn:fileIdentifier>
        <urn:displayName>sample text</urn:displayName>
        <urn:id></urn:id>
        <urn:uuid></urn:uuid>
    </urn:fileIdentifier>
</urn:UpdateFileField>