sforce logo

Document


Represents a file that a user has uploaded. Unlike Attachment objects, Documents are not attached to a parent object.

Supported API Calls

create, update, delete, query, getDeleted, getUpdated, retrieve, describeSObject

Fields

For a complete list of fields in this object, see the Enterprise WSDL file for your organization and the salesforce.com online help.

Document Fields 
Field
Data Type
Description
FolderId
ID
ID of the Folder that contains the Document. See Folder.
Name
string
Name of the Document.
Type
string
File type of the Document. In general, the values match the file extension for the type of Document (such as pdf or jpg.).
Body
base64Binary
Encoded file data. If specified, then do not specify an URL.
BodyLength
int
Size of the file (in bytes).
URL
string
URL reference to the file (instead of storing it in the database). If specified, do not specify the Body / BodyLength.
Description
string
Text description of the Document.
Author
string
ID of the User who is responsible for the Document.

Usage

You must have the "Edit" permission on Documents and the appropriate access to the Folder that contains a document in order to create or update a Document in that Folder.

When calling create or update for a document, a client application can specify a value in either the Body or URL fields-but not both.

Encoded Data

The sforce API sends and receives the binary file data encoded as a base64Binary data type. Prior to create, clients must encode the binary file data as base64. Upon receiving an API response, clients must decode the base64 data to binary (this conversion is usually handled for you by the SOAP client).

Maximum Document Size

The create and update calls restrict documents to a maximum size of 5MB.

See Also

Concepts


© Copyright 2000-2003 SalesForce.com, Inc.
All rights reserved • Various trademarks held by their respective owners.