{ "sections": [ "title", "description", "fields", "special_access_rules", "usage", "wsdl_segment", "field_reference" ], "title": "Document - Data API", "description": "Represents a file that a user has uploaded. Unlike Attachment records, documents are not attached to a parent object.", "fields_columns": [ "type", "properties", "description", "relationship_name", "relationship_type", "refers_to" ], "fields": { "AuthorId": { "type": "reference", "properties": "Create, Defaulted on create, Filter, Group, Sort, Update", "description": "ID of the User who is responsible for the Document. This is a relationship field.", "relationship_name": "Author", "relationship_type": "Lookup", "refers_to": "User" }, "Body": { "type": "base64", "properties": "Create, Nillable, Update", "description": "Encoded file data. If specified, then do not specify a URL.", "required": true }, "BodyLength": { "type": "int", "properties": "Filter, Group, Sort", "description": "Size of the file (in bytes)." }, "ContentType": { "type": "string", "properties": "Create, Filter, Group, Nillable, Sort, Update", "description": "Type of content. Label is Mime Type. Limit: 120 characters.If the Don't allow HTML uploads as attachments or document records security setting is enabled for your organization, you cannot upload files with the following file extensions: .htm, .html, .htt, .htx, .mhtm, .mhtml, .shtm, .shtml, .acgi, .svg." }, "Description": { "type": "textarea", "properties": "Create, Filter, Group, Nillable, Sort, Update", "description": "Text description of the Document. Limit: 255 characters." }, "DeveloperName": { "type": "string", "properties": "Create, Defaulted on create, Filter, Group, Sort, Update", "description": "The unique name of the object in the API. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. In managed packages, this field prevents naming conflicts on package installations. With this field, a developer can change the object’s name in a managed package and the changes are reflected in a subscriber’s organization. Label is Document Unique Name. Note: When creating large sets of data, always specify a unique DeveloperName for each record. If no DeveloperName is specified, performance may slow while Salesforce generates one for each record." }, "FolderId": { "type": "reference", "properties": "Create, Filter, Group, Sort, Update", "description": "ID of the Folder that contains the document. This is a relationship field.", "relationship_name": "Folder", "relationship_type": "Lookup", "refers_to": "Folder, User", "required": true }, "IsBodySearchable": { "type": "boolean", "properties": "Defaulted on create, Filter, Group, Sort", "description": "Indicates whether the contents of the object can be searched using a SOSL FIND call. The ALL FIELDS search group includes the content as a searchable field." }, "IsDeleted": { "type": "boolean", "properties": "Defaulted on create, Filter", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false). Label is Deleted." }, "IsInternalUseOnly": { "type": "boolean", "properties": "Create, Defaulted on create, Filter, Group, Sort, Update", "description": "Indicates whether the object is only available for internal use (true) or not (false). Label is Internal Use Only." }, "IsPublic": { "type": "boolean", "properties": "Create, Defaulted on create, Filter, Group, Sort, Update", "description": "Indicates whether the object is available for external use (true) or not (false). Label is Externally Available." }, "Keywords": { "type": "string", "properties": "Create, Filter, Group, Nillable, Sort, Update", "description": "Keywords. Limit: 255 characters." }, "LastReferencedDate": { "type": "datetime", "properties": "Filter, Nillable, Sort", "description": "The timestamp for when the current user last viewed a record related to this record." }, "LastViewedDate": { "type": "datetime", "properties": "Filter, Nillable, Sort", "description": "The timestamp for when the current user last viewed this record. If this value is null, this record might only have been referenced (LastReferencedDate) and not viewed." }, "Name": { "type": "string", "properties": "Create, Filter, Group, idLookup, Sort, Update", "description": "Name of the document. Label is Document Name.", "required": true }, "NamespacePrefix": { "type": "string", "properties": "Filter, Group, Sort, Nillable", "description": "The namespace prefix that is associated with this object. Each Developer Edition org that creates a managed package has a unique namespace prefix. Limit: 15 characters. You can refer to a component in a managed package by using the namespacePrefix__componentName notation. The namespace prefix can have one of the following values. In Developer Edition orgs, NamespacePrefix is set to the namespace prefix of the org for all objects that support it, unless an object is in an installed managed package. In that case, the object has the namespace prefix of the installed managed package. This field’s value is the namespace prefix of the Developer Edition org of the package developer. In orgs that are not Developer Edition orgs, NamespacePrefix is set only for objects that are part of an installed managed package. All other objects have no namespace prefix." }, "Type": { "type": "string", "properties": "Create, Filter, Group, Nillable, Sort, Update", "description": "File type of the Document. In general, the values match the file extension for the type of Document (such as pdf or jpg). Label is File Extension." }, "Url": { "type": "string", "properties": "Create, Filter, Nillable, Group, Sort, Update", "description": "URL reference to the file (instead of storing it in the database). If specified, do not specify the Body or BodyLength." } }, "special_access_rules": "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.", "usage": "When creating or updating a document, you can specify a value in either the Body or Url fields, but not both.", "wsdl_segment": "```xml\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n\n```", "field_reference": { "AuthorId": { "field_label": "Author ID", "type": "reference", "length": "18" }, "Body": { "field_label": "Body", "type": "base64" }, "BodyLength": { "field_label": "Body Length", "type": "int", "digits": "8" }, "ContentType": { "field_label": "MIME Type", "type": "string", "length": "120" }, "CreatedById": { "field_label": "Created By ID", "type": "reference", "length": "18" }, "CreatedDate": { "field_label": "Created Date", "type": "datetime" }, "Description": { "field_label": "Description", "type": "textarea", "length": "255" }, "DeveloperName": { "field_label": "Document Unique Name", "type": "string", "length": "80" }, "FolderId": { "field_label": "Folder ID", "type": "reference", "length": "18" }, "Id": { "field_label": "Document ID", "type": "id", "length": "18" }, "IsBodySearchable": { "field_label": "Document Content Searchable", "type": "boolean" }, "IsDeleted": { "field_label": "Deleted", "type": "boolean" }, "IsInternalUseOnly": { "field_label": "Internal Use Only", "type": "boolean" }, "IsPublic": { "field_label": "Externally Available", "type": "boolean" }, "Keywords": { "field_label": "Keywords", "type": "string", "length": "255" }, "LastModifiedById": { "field_label": "Last Modified By ID", "type": "reference", "length": "18" }, "LastModifiedDate": { "field_label": "Last Modified Date", "type": "datetime" }, "LastReferencedDate": { "field_label": "Last Referenced Date", "type": "datetime" }, "LastViewedDate": { "field_label": "Last Viewed Date", "type": "datetime" }, "Name": { "field_label": "Document Name", "type": "string", "length": "255" }, "NamespacePrefix": { "field_label": "Namespace Prefix", "type": "string", "length": "15" }, "SystemModstamp": { "field_label": "System Modstamp", "type": "datetime" }, "Type": { "field_label": "File Extension", "type": "string", "length": "40" }, "Url": { "field_label": "Url", "type": "string", "length": "255" } }, "field_reference_columns": [ "field_label", "type", "length", "digits" ] }