Bookshelf Home | Contents | Index | PDF |
Oracle Web Services On Demand Guide > Using Attachments with Web Services On Demand > Specifying File Attachment Content > Attaching a File to Multiple RecordsThe ContentId attribute of the <Attachment> element is used to uniquely identify attachment content. The ContentID argument is optional and the Web services framework generate ones for its internal processing, if it is not provided. The ContentID attribute allows you to reuse the content contained in another <Attachment> element so that you can specify the same attachment content for multiple records. When reusing the content in this way, you must only specify the ContentID value, and the attachment content must be empty. Values of the ContentID attribute must be unique. The following SOAP request shows how a file can be attached to two records: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <AccountWS_AccountInsert_Input xmlns="urn:crmondemand/ws/account/10/2004"> <Description>Account for attachment and resuse test</Description> <Location>Bangalore</Location> <AccountName>Attach Test Reuse</AccountName> <NumberEmployees>300</NumberEmployees> <FileNameOrURL>Attached</FileNameOrURL> <FileExtension>doc</FileExtension> <DisplayFileName>To be reused</DisplayFileName> <Attachment ContentId="reuse">0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAACAAAA+AAAAAAAAAAAEAAA+gAAAAEAAAD+////AAAAAPYAAAD3AAAA/////////////////////////// .......... The Base64 encoded stream goes here .......... AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</Attachment> <Description>This copying the attachment</Description> <Location>San Mateo</Location> <AccountName>Attach Test Copy</AccountName> <NumberEmployees>300</NumberEmployees> <FileNameOrURL>Attach Reuse</FileNameOrURL> <FileExtension>doc</FileExtension> <DisplayFileName>Reused</DisplayFileName> <Attachment ContentId="reuse"></Attachment> </AccountWS_AccountInsert_Input> The SOAP request above shows how you can attach the same file to two different Account records:
|
Oracle Web Services On Demand Guide, Version 25.0 (Oracle CRM On Demand Release 37) | Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |