Dynamics 365 v9.0 has the ability to create a new App based on an existing App. I had a requirement to create a new App based on Field Resource Hub App. So, I created a new App using following steps.
In the solution, click New and click App.
The App Designer opens. Complete the mandatory fields as shown below and click Next.
Now, you can select a solution and a Site Map. If you choose Default Solution, you’ll get all the available Site Maps. Select the Site Map. This will add Site Map picked and all the corresponding components into the App. Click Done.
The App is created. Let’s compare the original Field Resource App and the new App.
On the left-hand side, we can see the new App. Field Resource Hub App is on right. Although the Site Map is the same, rest of the configurations are not the same. We can only see the entities defined in the Site Map. Form and View selections are not copied across.
For example, in this example;
- All Dashboards are included instead of just one as defined in the Field Resource Hub
- Account entity should only enable 2 Forms, 3 Views, and 1 Chart but all Forms, Views, Charts are enabled
- Agreement entity and many others are missing
Ideally, what we need is a Save As button. If you would like Microsoft to add this feature, please vote for below idea.
In the meantime, we need a way to easily clone an existing App. You can follow the steps below.
— DISCLAIMER – START —
WARNING: Some of the steps involve modifying customization.xml and solution.xml in the exported solution. Use it at your own risk. Backup your instance just in case.
— DISCLAIMER – END —
Step 1: Create a new solution with Field Resource Hub App and the associated Site Map
Step 2: Export the solution. Select Package Type – Unmanaged and click Export.
Step 3: Extract the solution
Step 4: Open the customization.xml file and solution.xml file in Notepad++ (or your favourite editor). Find and replace msdyn_FieldServiceMobile with d3a_FieldServiceMobile (or choose your own name) in both files.
Step 5: Find and replace Field Resource Hub with Dyn365Apps Field Service Hub (or choose your own name) in both files. Save the files.
If I zip this up and try to import the solution at this point, I get the following error. So, don’t do it.
Step 6: To resolve this, we need to remove some dependencies. Search for d3a_FieldServiceMobile in solution.xml. Find the two MissingDependency elements where required SchemaName=”d3a_FieldServiceMobile” and solution=”FieldServiceUCIAppModule (22.214.171.124)”. Delete the two MissingDependency elements (See the highlighted section below). Save the files.
Step 7: Modify the solution name.
Step 8: Zip the files up.
Step 9: Import the solution. Once successful, click Publish All Customizations.
Step 10: Test the new App. Press CTRL + F5 to make sure the new configuration is loaded correctly.
New solution is installed. The new App is visible in the App Launcher.
Open the new solution and open the new App. The complete configuration has been cloned.
Thank you for visiting Dyn365Apps.com.
Follow me on Twitter to get the latest news, tips and tricks and more …
Until next time…
About the Author
Nadeeja Bomiriya is a Microsoft MVP, Chapter Lead – Dynamics 365 Saturday – Australia, President – Melbourne Dynamics 365 User Group, Technical Architect, and Dynamics 365 Practice Lead who lives in Melbourne, Australia.