Symptom
- You have create tickets via OData API with a formatted text (ServiceRequestTextCollection with Typecode 10004)
- When using special tags like h4, the ODATA API returns an 500 error: Tag <h4> is not found in the include list::Tag <h4> is not found in the include list.
- When they create a custom field with type "formatted text" the payload with the "h4" works fine
Environment
SAP Cloud for Customer
Reproducing the Issue
- Perform a POST request to the Service Request Text Collection using POSTMAN
- For example, as a tests use the following sample data:
- URL: [yourtenant].crm.ondemand.com
- Odata POST:
- URL: https://[yourtenant].crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/ServiceRequestCollection('00163E03A0701ED28A8644CF8D83AE76')/ServiceRequestTextCollection
- Payload:
{
"TypeCode" : "10011",
"FormattedText":"<h4> test HTML injection </h4>"
}
- If you perform the same POST without the <h4> and </h4> tags, the operation is successful
Cause
Working as designed
Resolution
- The Tag <h4> is not allowed in ServiceRequestTextCollection OData.
- For a list of available tags that can be used, please refer to the below screen shot
See Also
- 2816159 - Tickets Created via SOAP (ServiceRequestIn) Shows Scrambled Interactions in Fiori
- Testing OData Services
Keywords
Data Workbench, DWB, Template, Service Request, OData, Service, C4C, missing, Tags, API, HTML, ticket, a, b, br, span, p, strong, sub, sup, tt, u, ul, div, s, li, img, img/ , KBA , LOD-CRM-SRP-API , Ticket API & Odata , How To
Product
SAP Cloud for Customer add-ins all versions ; SAP Cloud for Customer core applications 2108 ; SAP Cloud for Customer core applications all versions