Introduction
Your organization may employ sandboxes to work on and test changes to your organizations before pushing them to production. With TaroWorks, you can use assigning Jobs to group to only expose your TaroWorks Jobs in production to a test mobile user first, before releasing the Job to real mobile users. However, if you want to do a larger scale test without generating test data in your production environment, you want want to build and test your Jobs in a sandbox. Since your TaroWorks Jobs and Forms are not Salesforce metadata, they cannot be deployed using change sets. So how would you migrate your Forms from the sandbox to production? With sfApex licenses, you can use the following steps to migrate forms between Salesforce instances.
- A. Install SFXOrgData (sfApex Cloud) - A cloud tool to copy data.
- B. Log into SFXOrgData (sfApex Cloud) - You'll need credentials for each of the source and destination organizations.
- C. Migration of Forms - Migrate all Forms or a subset, excluding some illegal fields.
- D. Migration of Jobs - Migrate all jobs or a subset, excluding some illegal fields.
- E. Publish Forms & Jobs - Publish Forms as normal.
- F. Troubleshooting - When a Job and a Form is migrated, but the Form has no questions.
In the following example I have a Form in a Sandbox that I would like to migrate to Production:
A. Install SFXOrgData (sfApex Cloud)
- Visit this website for more details on this tool and contact Chad Hoerner (chad.hoerner@druva.com) for pricing on Sandbox Seeding.
B. Log in to SFXOrgData (sfApex Cloud)
-
Log into the Salesforce Instance that has the sfApex application licensed.
-
On the App launcher select OrgTools.
- Add the Source and Destination Environment.
C. Migration of Forms
- Clone all Forms you'd like to migrate into a Draft Status.
- Create a New Project
- Select the data to copy using one of the following methods:
- Use Record Selection to pick individual records plus all related records to copy.
- Use Query-based selection to select records dynamically by creating a query.
- Click Data Template settings
- Exclude Objects.
- Exclude gfsurveys__Answer__c Object.
- Exclude gfsurveys__Answer__c Object.
- Exclude Objects.
- Exclude Fields.
- Search by Object; “gfsurveys__Survey__c”. Scroll down and Exclude these fields (leave the ones that are not visible)
-
LastActivityDate
-
LastModifiedById
-
LastModifiedDate
-
LastReferencedDate // Not visible
-
LastViewedDate // Not visible
-
- Click Data Template settings
- Click Query-based selection then Add Query.
- Select "gfsurveys_Survey_c".
- In the Where Clause box enter “gfsurveys__Status__c = 'Draft'“
- In the Include Related Child Record click on the drop down and select All Child Objects then Save.
- Select "gfsurveys_Survey_c".
- Click Add to Data Templates to start the discovering the records from the source environment.
- Click Start Data Copy.
- Click Ok.
- Use Percentage-based selection to copy data without regard for which specific records are selected.
D. Migration of Draft Jobs
- Create a Data Template
- Select the data to copy using one of the following methods:
- Use Record Selection to pick individual records plus all related records to copy.
- Use Query-based selection to select records dynamically by creating a query.
- Click Data Template Settings.
- Exclude Objects.
- Exclude gfsurveys__Answer__c Object.
- Exclude gfsurveys__Answer__c Object.
- Exclude Objects.
- Exclude Fields
- Search by Object; “gfsurveys__JobTemplate__c ”. Scroll down and Exclude these fields (leave the ones that are not visible)
- JobTemplate__c.OwnerId
- JobTemplate__c.SystemModstamp
- Click Data Template Settings.
- Click Query-based selection then Add Query.
- Select "gfsurveys_Survey_c".
- In the Where Clause box enter “gfsurveys__Status__c = 'Draft'“
- In the Include Related Child Record click on the drop down and select All Child Objects then Save.
- Select "gfsurveys_Survey_c".
- Click Add to Data Templates to start the discovering the records from the source environment.
- Click Start Data Copy.
- Click Ok.
- Use Percentage-based selection to copy data without regard for which specific records are selected.
You now have copies of your draft Forms and Jobs in your destination org!
E. Publish Forms and Jobs
- In the destination Org, Click on the Forms tab.
- Click the Play button next to migrated Forms.
- Confirm Publishing.
-
Click on the Jobs tab.
-
Click the Play button next to migrated Jobs.
-
Confirm Publishing.
-
Assign to Groups and test.
F. Troubleshooting
Issue
More than one Form Version is created when you migrate a Form and one of the Form Version has no questions and field mappings.
Cause
A Job having 'Collect data' task, and the Job contains any 'Form' that is not present on the destination org.
Solution
Delete the Form Version that has no questions and field mappings by following the steps below.
- From Setup, Quick Find and select Tabs.
- Click New.
- Select Form from the Object dropdown and select Tab Style.
- Click Next.
- Click Save.
- Open the created Form Tab from More dropdown.
- Select Form.
- Click Related.
- Scroll down to FormVersions.
- Select delete from the dropdown on the right side of the first FormVersion that has no questions and field mappings.
Comments
0 comments
Article is closed for comments.