This guide describes the data processes that occur when a user navigates a questionnaire. Every CQC rule is checked when a user clicks Next on a questionnaire. The questionnaire must have Check CQC? enabled in Questionnaire Builder.
Clicking Next on a questionnaire node triggers the following:
- Questionnaire Output object (litify_pm__Questionnaire_Output__c) is either empty or contains references to previous Question Answer (litify_pm__Question_Answer__c) objects. New Question Answer objects are created. These Question Answer objects are appended to the Questionnaire Output object for this questionnaire. These objects are not saved to Salesforce at this point.
- SObject modifications are applied and saved to Salesforce.
- Questionnaire determines the next node to visit based on navigation rules.
- As part of process 3, the code runs CQC against the Questionnaire Output object and associated Question Answer objects that have been created.
- Question_Answer__c objects are saved to Salesforce.
- Questionnaire_Output__c object is saved to Salesforce.
- Data is passed back to user interface which updates based on next node or cqc trigger.