How To - Clone Unified Client Interface App

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.

Create new App - Step 1

The App Designer opens.  Complete the mandatory fields as shown below and click Next.

Create new App - Step 2

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.

Create new App - Step 3

The App is created.  Let’s compare the original Field Resource App and the new App.

Compare Field Resource Hub and new App

Problem

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;

  1. All Dashboards are included instead of just one as defined in the Field Resource Hub
  2. Account entity should only enable 2 Forms, 3 Views, and 1 Chart but all Forms, Views, Charts are enabled
  3. Agreement entity and many others are missing

Solution

Ideally, what we need is a Save As button.  If you would like Microsoft to add this feature, please vote for below idea.

Vote for the idea: Ability to Clone an existing App using Save As button in App Designer

Alternate Solution

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

Solution with App and Site Map

Step 2: Export the solution.  Select Package Type – Unmanaged and click Export.

Export Solution - Package Type - Unmanaged

Step 3: Extract the solution

Extracted Solution File

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.

Replace - msdyn_FieldServiceMobile with d3a_FieldServiceMobile

Step 5: Find and replace Field Resource Hub with Dyn365Apps Field Service Hub (or choose your own name) in both files.  Save the files.

Replace - Field Resource Hub with Dyn365Apps Field Service Hub

If I zip this up and try to import the solution at this point, I get the following error.  So, don’t do it.

Solution Import Error

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 (7.3.0.123)”.  Delete the two MissingDependency elements (See the highlighted section below).  Save the files.

Remove Missing Dependencies

Step 7: Modify the solution name.

Modify Solution Name

Step 8: Zip the files up.

Zip up the files

Step 9: Import the solution.  Once successful, click Publish All Customizations.

Import Successful

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.

New Solution and App installed correctly

Open the new solution and open the new App.  The complete configuration has been cloned.

New App with correct configuration

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.

[How To] Clone Unified Client Interface App