Skip to content
Zoran Ivanov edited this page Sep 28, 2017 · 5 revisions

MSCRM ToolKit - Documentation

Project Description

MSCRM ToolKit is a collection of useful tools for people working on Microsoft Dynamics CRM 2011++ projects.

It is built around features described in the Microsoft Dynamics CRM 2015 Software Development Kit.

In the toolkit you can find the following tools:

Requirements

The following requirements should be met prior to using MSCRM ToolKit:

Installation instructions

  • Unzip the contents of zip archive to any location on your computer to use the application.

Getting started

To start using the application you should launch the main exe file: MSCRMToolKit.exe

The MSCRM ToolKit's main window is like a toolbar from which you can launch the different tools you want to use.You can find the following menu items on the main window:

  • File
    • In this menu item you can find the sub item Exit. Use this item to exit the application
  • Connections Manager
    • Use this item to manage the connections to the different Microsoft Dynamics CRM 2011/2013/2015 deployments you want to work on.
  • Tools
    • Use this item's sub items to access and launch the different tools you want to work with.
  • Log
    • Use this item's sub items to view the current log file and to open the log archive.
  • Help
    • Use this item open this page into Internet Explorer.

The first thing to do when using the ToolKit is creating a connection to a CRM deployment:

Connections Manager

When launching the Connections Manager for the first time you can start creating a new connection.

Tips for creating a new connection:

  1. The Connection Name cannot contain spaces or specific characters because this value will be used to create files and folders.
  2. In the Server Address you should copy / paste the URL of the CRM deployment without the "main.aspx" in the end. These are examples of how the address should look like:
    • On-Premise: http://myserver/myorg/
    • IFD Claims-based internal access: https://internalcrm.mydomain.com/myorg/
    • IFD Claims-based external access: https://myorg.mydomain.com/
    • On-Line: https://myorg.crm.dynamics.com/
  3. The Organization Name for the online deployments is the name in the URL and not the unique name in the Developer Resources page.
  4. For On-Premise deployments you can use the Default Credentials of the logged user.
  5. The default Timeout is 2 minutes. You may set a bigger value here if you get the following error in some of the tools:The request channel timed out while waiting for a reply after 00:01:59.9969973. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.

Security considerations:
The connection information is saved into the "MSCRMConnections.xml" file in the application folder. Although the passwords are encrypted before saving make sure to limit the access to the computer on which the application is installed.

After providing all the information about the connection you can Save it.
You can find the saved connection in the Connections combo box between the other connections you already created. Using this combo box you can navigate through the different connections and modify them.
Finally you can "Test" the connection to verify that all is well. If the test passes you can close the Connections manager and use the newly created connection in the different tools.

Log

Most of the actions in the application will generate logs. The logs are written in files in the "log" folder. The log folder can be found in the application installation folder.
The log is automatically archived in monthly intervals.
You can use the Log menu in the main window and in the different tools to consult the current log file or to navigate through the archived log files.

Tools

Reference Data Transporter

The Reference Data Transporter can be used for transporting data between CRM deployments.
When use the Reference Data Transporter:

  • If you need to synchronize reference data between different project environments: Development, Test, Production ...
  • If you need to export reference data recreate the environment and reimport the data.
  • Schedule data synchronization between different project environments.
  • ...

The Reference Data Transporter will execute a predefined Transportation Profile to perform the transportation operations. A Transportation Profile is defined by the following properties:

  1. Profile Name: The unique name of the Transportation Profile used as parameter when scheduling the Profile execution.
  2. Operation:
    • Export Data: When selected the execution of the profile will download the records of the selected entities from the source environment.
    • Import Data: When selected the execution of the profile will upload the previously downloaded data into the target environment
    • Transport Data: When selected the execution of the profile will transport (download and the upload) the records of the selected entities in to the respective environments.
  3. Source: The connection from which the data will be downloaded.
  4. Target: The connection in which the data will be uploaded.
  5. Import Mode:
    • Create: When selected the execution of the profile will only attempt creation of the records during the upload into the target environment. If the record already exists into the target environment the creation attempt will fail.
    • Create or Update: When selected the execution of the profile will attempt creation of the records during the upload into the target environment. If the record already exists into the target environment the record will be updated.
    • Update: When selected the execution of the profile will only attempt update of the records during the upload into the target environment. If the record doesn’t exists into the target environment the record the update attempt will fail.
  6. Selected entities: List of entities to be transported.
    • The entities transport will be performed into the defined order.
    • For each entity by default all attributes from all records will be transported.
      Each entity provides a filtering possibility using FetchXML to filter the records used into the transport.
      Each entity provides a attributes selection possibility to eliminate the attributes you don't want to transport.
  7. Records Mapping: List of Records mappings. These mappings can be used to map a record from the Source deployment to the Target deployment in the Lookup attributes.
    • Example:
      The default transaction currency is automatically created on each new environment with a different ID. So transporting an entity containing a currency attribute from one environment to another will fail because the respective lookup attribute cannot be imported. Here you can use the Records Mapping and map the "transactioncurrency" entity with the Source Record Id and the Target Record Id. after doing this the transport will succeed.

 

Creating a new Transportation Profile

Provide all the necessary information for the Transportation Profile and Save it using the menu item File => Save or the keyboard shortcuts (Ctrl+S).

Entities selection tips:
When creating a Profile for a selected source connection for the first time you need to "Load the Source Structure" to be able to select the available entities. Once the Source structure is loaded it can be reused at will in any Profile. Make sure you Reload the structure if the CRM customization changes.

The Transportation Order is important to respect the entities dependencies.
Example: The Contact entity depends of the Account entity. So you need to import the Account entity before the Contact entity.

Selected entities details
Use the "..." button next to each selected entity to setup the selected attributes details and the records filter.

By default all the attributes of the entity are selected for transport. You can un-check the attributes you don't want to transport. Setting up a records filter:
You can filter the download records from the source environment using FetchXML query filter. You should use the "Advanced Find" feature in the CRM to generate the FetchXMl query and extract the filter.

Open the downloaded FetchXML query into your favorite XML editor (Notepad++, Notepad or else), copy the filter section from the query and paste it into the Filter editor:



Records Mapping:
Click on the Records Mapping button to open the Records Mapping wizard. Add a new Record Mapping, select the "transactioncurrency" entity; set the default currency Id form the Source deployment; set the default currency Id form the Target deployment :

Running a Transportation Profile

Press the Run Profile button to run the current profile.

You have the possibility to stop the execution of the transport.
When the profile execution is over you can view the report of the execution by clicking the button "Transport Report":

If there are import failures during the profile execution the button "Failures Report" will be visible. By clicking on this button you can open and see the failures details in Excel:

Scheduling a Transportation Profile

Another way of executing a Transportation Profile is by using the respective Command Line tool: "MSCRMReferenceDataTransporterCMD.exe" which can be found in the application install folder. Launching the command line tool without arguments will list the created Transportation Profiles and wait for a profile selection to run it. Another option is to provide the Profile name as an argument to run it directly.

After having created a Transportation Profile you can schedule it for execution using the Windows task scheduler. Make sure to provide the Profile Name as an argument in the scheduled task.

The content of the profiles is stocked in the folder "ReferenceDataTransporter" in the application install folder. For each Profile you will find the Profile folder named by the Profile Name. In it you there are 2 folders:

  1. Data: containing the Data of all the exported entities of the profile.
  2. ExecutionReports: containing the execution reports of the profile.

You can use the "Reference Data Transport Report Viewer" to view the execution reports.

 

N:N Associations Transporter

The N:N Associations Transporter can be used for transporting N:N Associations between different deployments.
When use the N:N Associations Transporter:

  • If you need to synchronize N:N Associations between different project environments: Development, Test, Production ...
  • If you need to export N:N Associations recreate the environment and reimport the data.
  • Schedule N:N Associations synchronization between different project environments.
  • ...

The N:N Associations Transporter will execute a predefined N:N Transport Profile to perform the transportation operations. A N:N Transport Profile is defined by the following properties:

  1. Profile Name: The unique name of the N:N Transport Profile used as parameter when scheduling the Profile execution.
  2. Operation:
    • Export Data: When selected the execution of the profile will download the records of the selected N:N Relationships from the source environment.
    • Import Data: When selected the execution of the profile will upload the previously downloaded data into the target environment
    • Transport Data: When selected the execution of the profile will transport (download and the upload) the records of the selected N:N Relationships in to the respective environments.
  3. Source: The connection from which the data will be downloaded.
  4. Target: The connection in which the data will be uploaded.
  5. Selected N:N Relationships: List of N:N Relationships for which the Associations will be transported.

Important Note:
You may want to run the N:N Associations Transporter after the Reference Data Transporter for it to work well. The Reference Data Transporter will ensure that you have the same IDs for the records on both Source and Target Environments.

 

Creating a new N:N Transport Profile

Provide all the necessary information for the N:N Transport Profile and Save it using the menu item File => Save or the keyboard shortcuts (Ctrl+S).

N:N Relationships selection tips:
When creating a Profile for a selected source connection for the first time you need to "Load the Source Structure" to be able to select the available N:N Relationships. Once the Source structure is loaded it can be reused at will in any Profile. Make sure you Reload the structure if the CRM customization changes.

Running a N:N Transport Profile

Press the Run Profile button to run the current profile.

You have the possibility to stop the execution of the transport.
When the profile execution is over you can view the report of the execution by clicking the button "Transport Report":

If there are import failures during the profile execution the button "Failures Report" will be visible. By clicking on this button you can open and see the failures details in Excel:

Scheduling a N:N Transport Profile

Another way of executing a N:N Transport Profile is by using the respective Command Line tool: "MSCRMNtoNAssociationsTransportManagerCMD.exe" which can be found in the application install folder. Launching the command line tool without arguments will list the created N:N Transport Profiles and wait for a profile selection to run it. Another option is to provide the Profile name as an argument to run it directly.
After having created a N:N Transport Profile you can schedule it for execution using the Windows task scheduler. Make sure to provide the Profile Name as an argument in the scheduled task.

The content of the profiles is stocked in the folder "NtoNAssociationsTransporter" in the application install folder. For each Profile you will find the Profile folder named by the Profile Name. In it you there are 2 folders:

  1. Data: containing the Data of all the exported N:N Associations data of the profile.
  2. ExecutionReports: containing the execution reports of the profile.

You can use the "N:N Transport Report Viewer" to view the execution reports.

 

Data Export Manager

The Data Export Manager can be used for exporting data from a CRM deployment.
When use the Data Export Manager:

  • If you need to export data from a CRM environment in some of the following formats:
    • XML
    • XML Spreadsheet 2003
    • CSV

The Data Export Manager will execute a predefined Data Export Profile to perform the export operation. A Data Export Profile is defined by the following properties:

  1. Profile Name: The unique name of the Data Export Profile used as parameter when selecting the Profile in the Data Export Manager or when scheduling the Profile execution.
  2. Source: The connection from which the data will be downloaded.
  3. Export Format:
    • XML: The data will be exported into XML format. The exported file can be opened in Excel.
    • XML Spreadsheet 2003: The data will be exported into the XML Spreadsheet 2003 format.
    • CSV: The data will be exported into the CSV format.
  4. Encoding:
    • Default.
    • UTF8
    • Unicode
    • ASCII
    • BigEndianUnicode
  5. FetchXML query to use for the data export.

 

Creating a new Data Export Profile

Provide all the necessary information for the Data Export Profile and Save it using the menu item File => Save or the keyboard shortcuts (Ctrl+S).

Creating the FetchXML query:
You should use the "Advanced Find" feature in the CRM to generate the FetchXMl query:

Open the downloaded FetchXML query into your favorite XML editor (Notepad++, Notepad or else), copy the entire FetchXML query from the query and paste it into the Query editor:

Running a Data Export Profile

Press the Run Profile button to run the current profile. When the profile execution is over you can view the report of the execution by clicking the button "Data Export Report":

Scheduling a Data Export Profile

Another way of executing a Data Export Profile is by using the respective Command Line tool: "MSCRMDataExportManagerCMD.exe" which can be found in the application install folder. Launching the command line tool without arguments will list the created Data Export Profiles and wait for a profile selection to run it. Another option is to provide the Profile name as an argument to run it directly.
After having created a Data Export Profile you can schedule it for execution using the Windows task scheduler. Make sure to provide the Profile Name as an argument in the scheduled task.

The content of the profiles is stocked in the folder "DataExportManager" in the application install folder. For each Profile you will find the Profile folder named by the Profile Name. In it you there are 2 folders:

  1. Data: containing the Data of all the exported data of the profile.
  2. ExecutionReports: containing the execution reports of the profile.

You can use the "Data Export Report Viewer" to view the execution reports.

 

Export Entities Structure

The Export Entities Structure tool can be used to export the MetaData structure of the CRM:

  • Entities Metadata
  • Attributes Metadata
  • Relationships Metadata
  • Entities Diagrams

Entities Diagrams generation Prerequisites:
To use the Entities Diagrams generation tool you must have Microsoft Visio 2010 or a more resent version installed on the machine running the MSCRM ToolKit.

You have to download the Metadata from the CRM before exporting the structure.
Select the connection from which you want to download the Metadata and press the "Load entities from Source" button. When the download is finished the entities will be displayed in the Checkbox list.

 

 

  1. Entities and Attributes structure export:
    Select the entities you want to export.
    Check the Metadata parameters you want to export.
    Press the "Export Structure" button.
  2. Relationships export:
    Select the entities for which you want to export the relationships.
    Press the "Relationships" button.
  3. Entities Diagram export:
    Select the entities for which you want to export the Relationhips Diagram.
    Set the Diagram Generation Properties.
    Press the "Generate Diagram" button.
  4. Fields on Forms Export:
    Select one entity for which you want to export the the Attributes on Forms distribution.
    Press the "Fields on Forms" button. This will generate an Excel file with the lines representing the Entity attributes and columns representing the Entity forms. For each Attribute and Form there will be a flag (TRUE|FALSE) if the Attribute is placed on the form or not.

The Entities, Attributes and N*N relationships will be generated in a XML files which you can open in Excel.
The Diagrams can be opened in Microsoft Visio.

 

Use case 1
Request:
Get all the audited fields in the CRM.
How-To:
Definition: One field is audited if: The field is Audit enabled, it's parent entity is Audit enabled and the Global Audit is enabled. For this example we shell assume that the Global Audit is enabled.
Step 1: Download the CRM structure.
Step 2: Select all entities
Step 3: Select the following metadata attributes for export:

  • Entity Logical Name
  • Entity Is Audit Enabled
  • Attribute Logical Name
  • Attribute Is Audit Enabled

Step 4: Export the Structure
Step 5: Open the Exported file in Excel
Step 6: Filter the 2 columns EntityIsAuditEnabled and AttributeIsAuditEnabled to display only the "True" value.


This will give you all the audited fields in the CRM

Use case 2
Request:
Generate a relationship diagram for the entities: Account, Contact, Lead and Opportunity.
How-To:
Step 1: Download the CRM structure.
Step 2: Select the 4 entities
Step 4: Generate the relationship diagram
Step 5: Open the generated diagram in Visio


This will give you the relationship diagram for the 4 entities

 

Deployment Properties (On-Premise only)

This tool can be used to modify the Deployment and Server properties of a Microsoft Dynamics CRM 2011/2013/2015 On-Premise deployment.
You should modify these values only if asked by Microsoft Dynamics CRM support engineer.
For more information visit: http://msdn.microsoft.com/en-us/library/gg328128

Solutions Transporter

The Solutions Transporter can be used for transporting solutions between CRM deployments.
When use the Solutions Export Manager:

  • If you need to transport (export from source and import in target) solutions between CRM deployments.
  • If you need to export solutions from a CRM deployments for backup purposes.
  • If you need to schedule regular execution of the solutions transport.

The Solutions Transporter will execute a predefined Solutions Transport Profile to perform the operation. A Solutions Transport Profile is defined by the following properties:

  1. Profile Name: The unique name of the Solutions Transport Profile used as parameter when selecting the Profile in the Solutions Transporter or when scheduling the Profile execution.
  2. Operation: The operation to be executed.
    • Export Solutions: Export the selected solutions from the source deployment
    • Import Solutions: Import previously exported solutions into the target deployment
    • Transport Solutions: Export the selected solutions from the source deployment and Import them into the target deployment
  3. Source Connection: The connection from which the solution will be exported.
  4. Export Folder: Folder on the local machine where the solutions archives will be exported.
  5. Selected solutions for transport.
  6. Export Solutions as Managed: If checked the solutions will be exported as managed
  7. Publish All Customizations (before export): Publish All Customizations on the source deployment before exporting the selected solutions
  8. Settings:
    • AutoNumbering: Export the Auto Numbering settings with the solutions.
    • Calendar: Export the Calendar settings with the solutions.
    • Customization: Export the Customization settings with the solutions.
    • EmailTracking: Export the Email Tracking settings with the solutions.
    • General: Export the General settings with the solutions.
    • Marketing: Export the Marketing settings with the solutions.
    • OutlookSynchronization: Export the Outlook Synchronization settings with the solutions.
    • RelationshipRoles: Export the Relationship Roles settings with the solutions.
    • IsvConfig: Export the Isv Config settings with the solutions.
  9. Target Connection: The connection in which the solution will be imported.
  10. Solutions to Import
    • Newest: Import the most recently exported solution archives found in the Export Folder
    • Oldest: Import the most remotley exported solution archives found in the Export Folder
    • [Specific Date]: Import the exported solution archives from a specific date found in the Export Folder
  11. Publish All Customizations (after import): Publish All Customizations on the target deployment after importing the selected solutions
  12. Activate processes and plugins: Activate processes and plugins on the target deployment after importing the selected solutions
  13. Overwrite Unmanaged Customizations: Overwrite Unmanaged Customizations on the target deployment when importing the selected solutions

Creating a new Solutions Transport Profile

Provide all the necessary information for the Solutions Transport Profile and Save it using the menu item File => Save or the keyboard shortcuts (Ctrl+S).

Load the list of solutions from the source deployment for selection.

Running a Solutions Transport Profile

Press the Run Profile button to run the current profile.

Hints:

  • You have the possibility to stop the transport by pressing the Stop Transport button
  • After the solutions import is done you can use the Import logs menu item to open in Excel the Solutions Import Logs

Scheduling a Solutions Transport Profile

Another way of executing a Solutions Transport Profile is by using the respective Command Line tool: "MSCRMSolutionsTransporterCMD.exe" which can be found in the application install folder. Launching the command line tool without arguments will list the created Solutions Transport Profiles and wait for a profile selection to run it. Another option is to provide the Profile name as an argument to run it directly.
After having created a Solutions Transport Profile you can schedule it for execution using the Windows task scheduler. Make sure to provide the Profile Name as an argument in the scheduled task.

The content of the profiles is stocked in the folder "SolutionsTransporter" in the application install folder.
The ZIP archives are named by the solution name and the export Date as a suffix.

Solutions Import Jobs Viewer

The Solutions Import Jobs Viewer can be used for:

  • Viewing the state of the Solutions Import Jobs on a CRM deployment.
  • Downloading the Import log files for finished Solutions Import Jobs.

To load the list of the Solutions Import Jobs:

  1. Select an existing Connection
  2. Press the Load Solutions Import Jobs button

Hints:

  • You can reload the list of solution import jobs at will to refresh the list
  • Only the 5000 newest Solution Import Jobs are loaded.
  • Use the Download log button on each line to download the Import log file and open it in Excel.
  • The downloaded Import log files are storred in the SolutionsImportJobsViewer folder

Workflow Execution Manager

The Workflow Execution Manager can be used for executing workflows on a CRM deployment.
When use the Workflow Execution Manager:

  • If you need to schedule the execution of Workflows for a selection of records on a CRM deployment.

The Workflow Execution Manager will execute a predefined Workflow Execution Profile to perform the export operation. A Workflow Execution Profile is defined by the following properties:

  1. Profile Name: The unique name of the Workflow Execution Profile used as parameter when selecting the Profile in the Workflow Execution Manager or when scheduling the Profile execution.
  2. Source: The connection on which the workflows will be executed.
  3. Selected workflow for execution.
  4. FetchXML query to use for the records on which the workflow will be executed .

 

Creating a new Workflow Execution Profile

Provide all the necessary information for the Workflow Execution Profile and Save it using the menu item File => Save or the keyboard shortcuts (Ctrl+S).

Select the connection on which you will execute the workflows.
Download the list of workflows for selection.
The list of workflows will contain all the workflows visible by your user account and for which the option "Available for execution on demand" is checked.

Running a Workflow Execution Profile

Press the Run Profile button to run the current profile.

Scheduling a Workflow Execution Profile

Another way of executing a Workflow Execution Profile is by using the respective Command Line tool: "MSCRMWorkflowExecutionManagerCMD.exe" which can be found in the application install folder. Launching the command line tool without arguments will list the created Workflow Execution Profiles and wait for a profile selection to run it. Another option is to provide the Profile name as an argument to run it directly.
After having created a Workflow Execution Profile you can schedule it for execution using the Windows task scheduler. Make sure to provide the Profile Name as an argument in the scheduled task.

Records Counter

This tool can be used to count the records in the different entities. This can be useful for online deployments for entities having more than 5000 records.

  1. Load the CRM structure.
  2. Select the entities for which you want to get the records number
  3. For each Entity you can provide a filter for the records you want to count using the "..." button.
  4. Press the "Get Records Number" button to generate a XML file (can be opened in Excel) of the entities with the respective records number.

 

Audit Export Manager

This tool can be used to export Audit details form the CRM.

The Audit Export Manager will execute a predefined Audit Export Profile to perform the export operation. An Audit Export Profile is defined by the following properties:

  1. Profile Name: The unique name of the Audit Export Profile used as parameter when selecting the Profile in the Audit Export Manager or when scheduling the Profile execution.
  2. Source: The connection from which the Audit details will be exported.
  3. Audit Type:
    • Audit Summary View: Same View as in the Settings => Audit
    • Record Change History: Same View as in the Record => Audit History
    • Attribute Change History: Same View as in the Record Filtered by an Attribute => Audit History
    • User Acces Audit: Same View as in the Settings => Audit but filtered on the User Access Actions / Operations
  4. Export Format:
    • CSV
    • XML
    • XML Spreadsheet 2003
  5. Encoding:
    • Default
    • UTF8
    • Unicode
    • ASCII
    • BigEndianUnicode
  6. Audit Date filter:
    • Between Dates
    • Last X Days
    • Last X Months
    • Last X Years
  7. Actions Filter: List of all Actions in the CRM which can trigger an Audit creation. Only selected Actions will be taken in account for the Audit Export
  8. Operations Filter: List of all Operations in the CRM which can trigger an Audit creation. Only selected Operations will be taken in account for the Audit Export
  9. Users Filter: List of all Users in the CRM. Only selected Users will be taken in account for the Audit Export
  10. Entities Filter: List of all Audit enabled Entities in the CRM. Only selected Entities will be taken in account for the Audit Export

 

Creating a new Audit Export Profile

Provide all the necessary information for the Audit Export Profile and Save it using the menu item File => Save or the keyboard shortcuts (Ctrl+S).

Select the Source connection from which you will export the Audit details
Download the Source structure.
The lists of Actions, Operations, Users, Entities will automatically be filled in.
Select the Audit Type. Depending on the selected Audit Type, the Action, Operation, Users, Entities lists will be Enabled.
The selection of the Encoding is important for the specific language export. The date filter is optional but recommended to avoid downloading a huge amount of data.

Running an Audit Export Profile

Press the Run Profile button to run the current profile.
When the running is finished a new button sill appear on the Interface inviting the user to open in Excel the exported data.

Scheduling an Audit Export Profile

Another way of executing a Audit Export Profile is by using the respective Command Line tool: "MSCRMAuditExportManagerCMD.exe" which can be found in the application install folder. Launching the command line tool without arguments will list the created Audit Export Profiles and wait for a profile selection to run it. Another option is to provide the Profile name as an argument to run it directly.
After having created a Audit Export Profile you can schedule it for execution using the Windows task scheduler. Make sure to provide the Profile Name as an argument in the scheduled task.