There are Multiple ways Adxstudio Portal can be deployed. Most commonly used are the following:

  1. WebsiteCopy tool
  2. Portal deployment with Configuration Migration tool
  3. ALM Toolkit and PowerShell

In this blog, we will discuss about ALM Toolkit ways and automating ways.

Typically Deploying ADX Studio consists of three main steps:

  1. Exporting data from source CRM instance.
  2. Importing data into destination CRM instance.
  3. Copying source file and dlls to the destination server.

Steps for First Time Deployment

  1. Take a backup of target environment.
  2. Delete the data from the website using the following steps.
    • This step is required because during Adxstudio installation, lots of configuration record has been created. We want to delete this so that the next incremental deployment will just be an update.

Find the below steps for deleting website data:

  1. Portals>Websites > select and delete portal. Typically, deleting website should delete all records related to website, but somehow it does not delete that so follow the next two steps.
  2. Portals >Web Forms > select and delete web forms.
  3. Also delete entity form, entity list, web template.

Deployment Using ALM Toolkit and PowerShell Script

The initial part of this section of the blog, as well as steps 1-7, is taken from a Webfortis article which I find very helpful. Do check it out: Using the Adxstudio ALM Toolkit for Exporting and Importing Data.

The ALM Toolkit is a suite of tools that can assist in automated change management and deployment of a Dynamics CRM organization. One of the core components of the ALM Toolkit is its library of PowerShell Scriplets that perform CRM solution and data management functions, allowing you to manage change, create backup versions, isolate development environments, and deploy CRM solutions to multiple environments.

  1. ADX studio ALM toolkit can be downloaded from here.
  2. Install the ALM Toolkit with the default settings and let the wizard complete.
  3. Once the installation is done, open Windows Powershell in Administrator mode. If you do not have Windows Powershell, you can install it here.
  4. Navigate to the folder where the ALM Toolkit was installed. Generally it should be located in: Local Disk (C:) -> Program Files (x86) -> Adxstudio -> ALM Toolkit -> 1.0.00xx (depending on the latest version).
  5. Copy the Adxstudio.Xrm.Powershell folder and paste it into your workstation folder.
  6. In your workstation folder, create the following script files in a text editor of your choosing (notepad, notepad++, etc.). We will create one script to perform the correct Cmdlet function and another script to establish the CRM connection.
  7. Copy and paste the following code in the text editor and save it as “GetExportConnection.ps1” in the workstation folder: The Task for this file is to Get Export Connection.

 

  1. Create “ExportData.ps1” file as below. The task for this file is to export data from source environment. Inside the query, please give all the entities that need to be exported. Normally, these are all the entities prefix with “adx_”. List of this entities can be found below:

 

  1. Create file “GetImportConnection.ps1”. The task for this file is to create connection for the destination import

 

  1. Create “ImportData.ps1” file. The task for this file is to import data to destination organization.

 

  1. Create “CopyFiles.ps1” file. The task for this files is to copy files needed for deployment.

 

  1. Create file “CallPowershellScripts.ps1” . The task for this file is to call all subsequent PowerShell files.

 

  1. Create “Application.bat” file and write the below code on that file.

Once this is done, click on the application.bat file  for Adxstudio Portal. That will do the following:

  • Export the configuration data from source environment.
  • Import the data into the destination environment.
  • Copy the necessary files from local folder to the server.

Note:

  • Always refresh cache on the target environment.
  • Don’t add “Web Form Session” entity for the export.
  • Make sure customization in source and destination environment are the same.