2537592 - Download Attachments Using OData Service

SAP Knowledge Base Article - Public

2537592 - Download Attachments Using OData Service

Symptom

You want to download the files attached to your documents (Opportunities, Service Requests, Leads, etc.) by making use of the delivered OData Service in your Cloud for Customer system, but the file is downloaded with a different name and with no file extension.

Reproducing the Issue

  1. Access the URL for the desired OData collection you want to use, for this test we will use the ServiceRequestCollection object;
  2. After using the URL for the object, i.e.: https://myXXXXXX.crm.ondemand.com/sap/c4c/odata/cust/v1/customerportal/ServiceRequestCollection('00163E12AEE81ED7A4E36D30984969AC')? (Replace XXXXXX with your system number after "my");
  3. Expand the Attachment folder by adding $expand=ServiceRequestAttachment at the end of the URL;
  4. Use the link provided in the property <d:DocumentLink>;
  5. If you click and select "Save" the file downloaded will be saved with the name "$value".

Cause

This is the standard system behavior.

Resolution

The OData service for the attachments folder has a property <Name> which can be used to save the files with the correct names.

There is no intention to change this at this point, and our suggestion is to raise it as a new requirement in our Ideas Place, available at https://influence.sap.com/SAPCloudforCustomer.

Keywords

KBA , LOD-CRM-EMP , Employee , How To

Product

SAP HYBRIS C4C 1705 ; SAP Hybris Cloud for Customer 1708 ; SAP Hybris Cloud for Customer 1711