SAP Knowledge Base Article - Public

3344967 - How To Have Filtered Results From SurveyQuestionAnswersCollection

Symptom

Customer cannot have filtered results from SurveyQuestionAnswersCollection. Both using the fields ObjectID, ParentObjectID and QuestionAnswerOptionUUID to filter.

Customer needs to use this information (questions and answers surveys) for the call in SAP BTP for the creation of a PDF file with information.

Environment

SAP Cloud for Customer

Reproducing the Issue


1. Test using: https://my000000.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/SurveyQuestionAnswersCollection -> see successful GET entries

2. Try to filter it -> Error <message xml:lang="en">Property XXXX not found in type SurveyQuestionAnswers</message>

Cause

In order to get results from SurveyQuestionAnswersCollection using the opportunity ID, go to surveyresponsecollection and provide the opportunity ID to the BusinessTransactionDocumentUUID field, then collect the object ID of the surveyresponsecollection, and pass it to the parent ID of surveyresponseITEMcollection, from there you can navigate to surveyquestionanswer.

Below are the API links for the given example-

https://my000000.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/SurveyResponseCollection?$filter= BusinessTransactionDocumentUUID eq 'XXXXXXXXXXXXXXXXXXXX'

https://my000000.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/SurveyResponseItemCollection('XXXXXXXXXXXXXXXXXXXX')/SurveyQuestionAnswers

This should give the required response.

 

Resolution

In addition, consider: 

Keywords

Filter; Results; SurveyQuestionAnswersCollection; ObjectID; ParentObjectID; QuestionAnswerOptionUUID; Questions and answers; Surveys. , KBA , LOD-LE-SUR-DEF , Survey definition = design time , How To

Product

SAP Cloud for Customer core applications 2305