About Attachments

Attachments can be exchanged for a number of objects using Web Services On Demand. The parent objects that have Attachment child objects are: Account, Accreditation, Activity, Campaign, Contact, Course, Custom Object 01 - 03, Dealer, Event, Exam, Lead, Opportunity, Service Request, and Solution. Attachments can also be exchanged for sales stages.

Note: Attachments can also be exchanged for client side extensions, but the mechanisms for extracting and uploading the attachments are different from the mechanisms used for attachments to other objects. Therefore, the information in this chapter does not apply to the attachments for client side extensions. For information about extracting and uploading attachments for client side extensions, see ClientSideExtensionRead and ClientSideExtensionUpsert.

File Attachments can be exchanged as text or as binary data. In the case of binary data, the data must be encoded as inline Base64 encoded data, which ensures that the binary data is in a printable format. Binary files must therefore be encoded into Base64 format in the content provided in SOAP requests.

File attachments added through Web services requests are limited to 20MB in size just as they are for the Oracle CRM On Demand UI. Attachments greater than 20MB in size are therefore rejected. To accommodate Base64 encoding of binary files, the request size limit for SOAP requests with attachment files is 28800 KB.

You can develop client applications that allow attachment files to be added or updated for multiple records. SOAP requests contain multiple records; the first record contains the attachment as well as a Content ID value. However, other records in the SOAP request do not need to contain the same attachment, they need only reference the Content ID value from the first record.

When adding attachment files to Oracle CRM On Demand through Web services, it is better for performance reasons to send requests sequentially. For more information about best practices when using attachments, see API Calls.