Views:

Overview

When creating data in a Dynamics 365 instance with the North52 Data Packager often you may want to disable Plug-ins and Processes before the data is created and then re-enable them after the data has been created. With the Data Packager we make it easy to automate this as part of the Data Package execution process.

This article describes how you can set up the Data Package to disable and then enable Plug-ins and Processes.

Create your Data Package

  • Navigate to Settings > North52 BPA > N52 Data Package
  • Click the New button
  • Rename your Data Package
  • Expand the Deployment Settings section and select a solution from the available options in the Solution Deployment drop down
  • Click Save

Add the Activate and Deactivate sheets

To add the capability to disable and then re-enable Plug-ins and Processes:

  • Select Snippets > DP Setup Processes
  • This will add two sheets Deactivate and Activate, and the supporting Global Calculations and Global Actions to the Data Package
    • The Deactivate sheet references two Global Actions: Deactivate Plug-ins and Deactivate Processes
    • The Activate sheet references two Global Actions: Activate Plug-ins and Activate Processes
    • The two sheets will be added as the first sheet and the last sheet before the Global Calculations and Global Actions sheets, with any existing Data Package sheets coming inbetween

Update the Plug-ins and Processes

The plug-ins and processes to be disabled/enabled are defined on the Global Calculation sheets as a comma separated list.

  • Select the Global Calculations tab
  • Locate the Calculation Value for the calculation: Plugin - EntitiesToDisableEnableCsv
    • Enter a comma separated list of entity schema names, for example:
      • 'account,contact,opportunity'
      • 'adx_webpage,adx_entitylist'
  • Locate the Calculation Value for the calculation: Process - ToDisableEnableCsv
    • Enter a comma separated list of Process names, for example:
      • 'North52 LMS - Lesson - Set Completed Date,Field Service - Associate Work Order Items to Booking'
  • Click Save

What happens when you execute the Data Package

There are two sheets, Deactivate and Activate, which control when the deactivation and activation occurs. The Deactivate Items sheet should be the first sheet in the Data Package and the Activate Items should be the last sheet before the Global Calculations and Global Actions sheets. You need to position other Data Package sheets between these sheets. 

  • Deactivate Items sheet
    • Has references to Global Actions: Deactivate Plug-ins and Deactivate Processes
  • Activate Items sheet
    • Has references to Global Actions: Activate Plug-ins and Activate Processes

The logic for executing these actions are found on the Global Actions sheet. Only Plug-ins and Processes which were already active will be deactivated and then reactivated as part of the Data Package execution. Any items already deactivated will not be activated.

Additional custom logic

If you have additional logic you'd like to execute before or after the Data Package sheets create or update records, you could create your own Actions to be executed on the Deactivate Items and Activate Items sheets