If uploading a JSON file triggers an unexpected error in Workbench, this may indicate the file is too large. Please check the size of the JSON file being imported and these troubleshooting options below.
1. Compress the File
In order to reduce the size of the JSON file, use https://codebeautify.org/jsonminifier to minimise excess (unrelated content) like white space. The contents of the JSON should be unchanged and just the size of the file will be reduced.
2. Manually Assign a File to a Form Version
Alternatively, if the file is still too large after minimising it, this method involves manually adding the JSON file to a Form Version on the Salesforce Platform.
1. In the target Org, ensure a record for the form being imported already exists. If not, create a new Form record.
2. Next, create a new Form Version of the form in the target Org. Navigate to the Versions tab in the Designer and select 'New'.
Make sure the Version Number is the next number in the sequence in the target Org. For example, if the target Org has existing Form Versions and the latest Version Number is 3, give the Form Version you are creating in the target Org Version Number 4. If no existing Form Versions exist in the target Org, give the Form Version you are creating in the target Org Version Number 1.
3. In the exported JSON file from the source Org, edit the versionNumber to be the same as the Version Number assigned in the target Org (Step 2).
Additionally, change the versionId to be the same as the versionId for the Form Version in the target Org. To find this, when viewing the Form Version on Salesfor, copy part of the URL in Salesforce before '/view' (no forward slashes included).
Save the JSON file.
4. Under the Form Version in the target Org is the Files Related List. Select Add Files and select the newly saved JSON file.
Then refresh the page to view the Smart Form's components (Picklists, Sections and Elements) in the Designer. These components are only available to view (not edit) in the Designer of a Form Version.
Prerequisite 1
1. Navigate to Setup > Object Manager > Form axsy_forms__Form__c and add the Form Versions Related List to the Page Layout of the Forms Object.
2. Once the Related List has been added to the Page Layout, select the wrench/spanner icon, expand the Buttons Menu and select the New checkbox.
Prerequisite 2
1. When viewing a Form Version record in the target Org, navigate to the cog icon at the top right-hand corner of the screen and select Edit Page.
2. Drag and drop the Related Lists component onto the Form Version Page Layout.
3. Select App Default and then the Assign as App Default Button beneath.
4. Select Axsy Smart Forms, Next > Next > Save.
5. Lastly, select Activate.