function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SuredreamSuredream 

Migrating a new survey version from one org to another

Hi All,

I could not find information on how to migrate a new survey version from one sandbox to another sandbox. Below reference only works in case of new Survey. 

https://help.salesforce.com/apex/HTViewHelpDoc?id=task_move_survey_sandbox_production.htm

Let me know, if someone has achieved this.

Thanks

Best Answer chosen by Suredream
SuredreamSuredream
Hi Vinay, 

Yes. Only the latest version will get added to the package.

But faced certain other challenges while deploying the survey version through metadata. So we are migrating the changes in Surveys manually.
- Create a new survey version using Metadata by renaming the survey file like {SurveyName}_{VersionNumber}
- Activate the new version in the target sandbox.
- Check the Survey versions. It is creating/updating a few versions with blank SurveyStatus values.
- Submitting the Survey Response if the Survey has a version with blank Survey Status is throwing an exception  - 
"An unhandled fault has occurred in this flow. An unhandled fault has occurred while processing the flow. Please Contact your system administrator for more information." 

I was able to rectify this by performing the below actions:
- Create a new version of survey manually & apply the intended changes.
- Run the below query in Query Editor in Developer Console and delete the SurveyVersions records which has blank SurveyStatus value.
    SELECT id,Name,VersionNumber,SurveyStatus from SurveyVersion

After performing the above steps, I am able to submit the survey successfully.

Thanks
 

All Answers

VinayVinay (Salesforce Developers) 
Hi,

As per my understanding, you want to migrate survey versions including old to another org?

Unfortunately, only the latest version is added to the package.

Let me know if my understanding is different.

Thanks,
Vinay Kumar
SuredreamSuredream
Hi Vinay, 

Yes. Only the latest version will get added to the package.

But faced certain other challenges while deploying the survey version through metadata. So we are migrating the changes in Surveys manually.
- Create a new survey version using Metadata by renaming the survey file like {SurveyName}_{VersionNumber}
- Activate the new version in the target sandbox.
- Check the Survey versions. It is creating/updating a few versions with blank SurveyStatus values.
- Submitting the Survey Response if the Survey has a version with blank Survey Status is throwing an exception  - 
"An unhandled fault has occurred in this flow. An unhandled fault has occurred while processing the flow. Please Contact your system administrator for more information." 

I was able to rectify this by performing the below actions:
- Create a new version of survey manually & apply the intended changes.
- Run the below query in Query Editor in Developer Console and delete the SurveyVersions records which has blank SurveyStatus value.
    SELECT id,Name,VersionNumber,SurveyStatus from SurveyVersion

After performing the above steps, I am able to submit the survey successfully.

Thanks
 
This was selected as the best answer
linda hdlinda hd
Only the latest version is added to the package. Conducting the survey is helpful anytime.
linda hdlinda hd
Only the latest version is added to the package. Conducting the survey is helpful anytime www.homedepot.com survey (https://www.homedepotcomsurveyss.com/)