Symptom
How to attach multiple attachments to a Service Request
Reproducing the Issue
- Go To Administrator WorkCenter
- Select OData Service Explorer subview
- In the Overview, Select SAP OData Services
- Select the Service Name:'c4codata and select the Test tab to open the OData Console
- Under Entity Sets, select ServiceRequestCollection and select the Test tab
- In the Request Method, select POST
- Select JSON tab and paste Payload as follow:
{
"CustomerID": "eg: 1000000",
"DataOriginTypeCode": "eg: 1",
"Name": {
"__metadata": {
"type": "c4codata.EXTENDED_Name"
},
"languageCode": "eg: E",
"content": "eg: SRQ-Name"
},
"ProcessingTypeCode": "eg: SRRQ",
"ServiceRequestAttachmentFolder":[
{
"TypeCode": "10001",
"MimeType": "text/plain",
"Binary": "eg:VGVzdCBhdHRhY2htZW50",
"Name": "Test CorpAcc1.txt",
"CategoryCode": "eg: 2"
},
{
"TypeCode": "10001",
"MimeType": "text/plain",
"Binary": "eg: VGVzdCBhdHRhY2htZW50",
"Name": "eg: Test CorpAcc2.txt",
"CategoryCode": "eg: 2"
}
]
}
To attach images, it is necessary to converted to Binary form and posted.
Keywords
image; odata; post; , KBA , odata , post , odata console , LOD-CRM-INT-API , OData API (C4C Only) , How To