Symptom
You are doing Odata query to get document (attachment) details of certain objects but in the response, the binary content is missing for word documents where for Images, the binary content is available in the response
Environment
SAP Sales Cloud
SAP Service Cloud
Reproducing the Issue
Below is a sample query,
To query a Service Ticket: https://myXYZ.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/ServiceRequestCollection?$filter=ID eq 'ABC'
To query the attachment of the service ticket: https://myXYZ.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/ServiceRequestCollection('Object ID')/ServiceRequestAttachmentFolder
----------Response---------
<d:MimeType>application/vnd.openxmlformats-officedocument.wordprocessingml.document</d:MimeType>
<d:Binary/>
-----------------------------
Cause
“DocumentLink” property has the link to download attachment. Using the link, download the attachment and if the attachment is empty then binary will not have content.
Document link you can find in the response of quering the attachment (send link as above)
Sample document link:
<d:DocumentLink>https://myXYZ.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/ServiceRequestCollection('Object ID 1')/ServiceRequestAttachmentFolder('Object ID 2')/Binary/$value</d:DocumentLink>
Resolution
This is expected system behavior
Keywords
attachment, binary, document link , KBA , AP-RC-ODF , OData framework (C4C Only) , Problem