Available in: Axsy Mobile for Salesforce, Axsy Field Service, Axsy Public Sector, Axsy Retail Execution
As a Form is completed, the response data is stored in a Form Response record axsy_forms__Form_Response__c. The raw JSON for a particular Form Response will be stored in either:
1. The Response Data field (Response_Data__c) on the Axsy Smart Form Response record (if the JSON contains < 131 072 characters).
or
2. In a file attached to the Axsy Smart Form Response record (if the JSON contains > 131 072 characters).
Once the Form Response exceeds 131 072 characters, the Response Data field will be set to {} and the response will be accessible through the File only. The file is generated only when the Form is submitted (and not when it's in the Draft state).
Sometimes, the Form Response draft data may be larger than the final, submitted data. In this case, the Response Data field is set to {} when in Draft status, but once submitted, the completed data will be under the limit and is therefore stored in the Response Data field.
To access the raw JSON for a particular Form Response in the first case, you will have to add the Response Data field to the page layout of Axsy Smart Form Response object in Salesforce. In the second case, the Files related list should be added to the page layout by default. The JSON can be also downloaded manually using the 'download' button on the Form Response's page.
Edit the Form Response Object's Page Layout
Navigate to Setup > Object Manger > Form Response > Page Layout > Form Response Layout and drag and drop Response Data field into the Details Section. If the Files Related List is not present, you can drag and drop it into the Related Lists Section. Save your changes.
On occasion, it may take a few minutes for the Response Data field to appear on the Form Response object Page Layout.
Once added to the Page Layout, navigating to a Form Response record will allow you to view the raw JSON Form Response (if under 131 000 characters), or the attached File (if over 131 000 characters).
Removing the complexity via Apex
To avoid the complexity of checking where the Response Data is stored, we recommend using a global Apex method getFormResponseData(responseId) that abstracts this detail. This allows the integrators to simply retrieve the string response data for a given Form Response Id. For example:
String formResponseData = axsy_forms.FormController.getFormResponseData('a0G8Z00000gXEYQUA4');