Home > Dynamics 365 > D 365 Managed Solutions – Delete Components from target instance using ‘Stage for Upgrade’ option

D 365 Managed Solutions – Delete Components from target instance using ‘Stage for Upgrade’ option

Assume that you have exported and imported a Managed Solution ‘A’ from DEV to TEST. The solution ‘A’ has 2 entities (E1 and E2) and got imported to Test instance.

Now, because of a change in requirement, you no longer required E2 entity and need to delete that from TEST instance.

How would you delete E2 using Solutions approach?

With ‘Upgrade Solution’ behavior of ‘Managed Solution’ (Refer flow below), solution components only gets updated but not the deletion of the components.

Sol_12

And the answer to this is ‘Stage for Upgrade’ option of ‘Managed Solutions’.

Lets take following scenario to understand it better

  • DEV instance has an entity ‘Interest Rate’
  • Export a Managed solution with ‘Interest Rate’ entity from DEV and import to TEST.
  • Delete the ‘Interest Rate’ entity from DEV
  • Prepare a Managed solution and import to TEST using ‘Stage for Upgrade’ option.
  • ‘Interest Rate’ entity should get deleted from TEST

Below is my TEST instance which has managed solution by name ‘Loan Management’ got installed with ‘Interest Rate’ entity.

Sol_1

Steps to use ‘Stage for Upgrade’ option:

Below are the usage steps of ‘Stage for Upgrade’ option.

Export Solution from DEV:

  • Connect to the DEV instance and delete the ‘Interest Rate’ entity.

Sol_2

  • Increase the version number of the ‘Loan Management’ Solution and export as Managed Solution.

Sol_3

Import Solution to TEST:

  • Connect to TEST instance and click on ‘Import’ solution and make sure versions are different.

Sol_4

  • Click ‘Next’
  • Select ‘Stage for Upgrade’ checkbox and click ‘Import’

Sol_5

  • Up on successful import, As a last step, you would get ‘Apply Solution Upgrade’.

Sol_6

  • Don’t click the ‘Apply Solution Upgrade’ yet as we need to check few things.
    • Note: You can always click ‘Apply Solution Upgrade’ and complete the upgrade. I refrained to do as I want to explain more.
  • Close the ‘Import Solution’ wizard.
  • Now on TEST instance, go to Advanced Find -> Interest Rate and you will still get the entity and data. Which means the Upgrade hasn’t happen yet.

Sol_7

  • Lets complete the Upgrade by go to Settings -> Solutions and you will see 2 solutions
    • Solution with ‘_Upgrade’ is Stage solution.

Sol_8

  • Select the old solution (i.e., Solution with no ‘_Upgrade’) and click on ‘Apply Solution Upgrade’.

Sol_9

  • The process takes time and once completed you would see a single solution with increase in version.

Sol_10

  • Now, go to Advanced Find -> Interest Rate and you will not get the entity and data.

Sol_11

Refer this White Paper for more details on Solution Life Cycle Management.

🙂

Advertisement
  1. October 14, 2019 at 11:18 PM

    Perfectly explained !!!

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: