on 03-30-2017 7:57 AM
Hi,
We have a scenario in which we want to download attachments from Service Requests stored in the SAP C4C system as attachment on our UI5 application using the standard odata i.e c4codata service.
Currently when trying to download the attachment using the url we get a $value file instead of the actual file with the extension.
I have attached screenshots for reference.
I think its due to the Binary field before the $value in the link . Tried to add the Binary value between the $value and still it doesn't work.
Any suggestions would be appreciated.
Hi,
Try using $expand=ServiceRequestAttachmentFolder to get the binary attribute passed in your odata service.
The category code 2 ( document), binary content will be passed. For category 3( link or Library), you need to use LinkWebURI attribute.
This is an example of odata service which would return you with binary content:
https://xxx.ondemand.com/sap/c4c/odata/v1/c4codata/ServiceRequestCollection?$expand=ServiceRequestAt...
This is how odata would return if you have category code with Link:
<d:Binary/>
<d:CategoryCode>3</d:CategoryCode>
<d:CategoryCodeText>Link</d:CategoryCodeText>
<d:CreatedBy>John Healy</d:CreatedBy>
<d:CreatedOn>2018-05-23T14:24:15.9133190</d:CreatedOn>
<d:DocumentLink/>
<d:ETag>2018-05-23T14:25:14.0577470Z</d:ETag>
<d:LastUpdatedBy>John Healy</d:LastUpdatedBy>
<d:LastUpdatedOn>2018-05-23T14:25:14.0577470</d:LastUpdatedOn>
"); vertical-align: bottom; height: 10px;"><d:LinkWebURI>
https://xx.crm.ondemand.com/sap/XXX/00163E23E5051EE88CB14ED39BEAD0A7/CBA.pdf?sap-client=100
</d:LinkWebURI>
<d:MimeType/>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.