D365 Automation Tools for Build & Release Pipelines
Use D365 Automation Tools to build deployment tasks for Dynamics 365 CE. The tool was developed based on the requirement that originated from actual projects.
NEW: Added support to export and import Document Templates
Extension Tasks
The following tasks are part of the automation tools: ( * -> Required )
Import Solution Using Configuration xml: Import solution using a configuration xml file that has the list and sequence of solutions to be installed. The task requires the below input parameters for execution:
Connection String*: Connection string to connect to the D365 Instance. Please refer here for further details
Configuration File*: Location of configuration file that details the solutions and sequence of installation for those. The configuration file is an XML file with the schema as below: <deploymentartifact> <solutions> <solutionfile solutionpackagefilename="<<Solution Relative Path>>" overwriteunmanagedcustomizations="true" publishworkflowsandactivateplugins="true" importasholdingsolution="false" /> </solutions> </deploymentartifact>
Node Name
Attribute
Description
deploymentartifact
Root Node
solutions
Parent Node enclosing all solutions to be imported
solutionfile
Individual Node for solution file to be imported
solutionfile
solutionpackagefilename
Relative Path of solution file name. eg ".\SolutionTest_1_0_0_1_Managed.zip"
solutionfile
overwriteunmanagedcustomizations
In case of managed solutions, indicates if unmanaged customizations have to be overwritten
solutionfile
publishworkflowsandactivateplugins
Indicates if workflows and plugins that are part of the solution have to be activated
solutionfile
importasholdingsolution
In case of managed solutions, indicates if solution upgrade has to be applied
Enble Tracing: Display the trace logs during the task execution
Import Configuration Migration Zip: Import configuration migration zip files (generated from the D365 Configuration Migration Tool) using a configuration xml file that has the list and sequence of zip files to be imported. The task requires the below input parameters for execution:
Connection String*: Connection string to connect to the D365 Instance. Please refer
here for further details
Configuration File*: Location of configuration file that lists the zip files to be imported. The configuration file is an XML file with the schema as below: <deploymentartifact> <filestoimport> <configimportfile filename="<<MasterData Zip Path>>" enablebatchmode="true" batchsize="500" concurrentthread="5" /> </filestoimport> </deploymentartifact>
Node Name
Attribute
Description
deploymentartifact
Root Node
filestoimport
Parent Node enclosing all zip files to be imported
configimportfile
Individual Node for zip file to be imported
configimportfile
filename
Relative Path of MasterData zip file name. eg ".\MasterData\BU.zip"
configimportfile
enablebatchmode
(Optional) Enable batch mode for the file import
configimportfile
batchsize
(Conditional) Required if the batch mode is enabled
configimportfile
concurrentthread
Number of concurrent threads for the data import
Replace Guids: Location of configuration file that has details about the guid to be replaced. This is required in case of association to records such as the root business unit, base currency id, etc which differs based on organization. This file should be of type ".json" and should have the format as below. Please note that the below GUID is from the source environment (i.e the environment from which the data zip is extracted). The task will replace the below GUID with the value from the target environment. [{ "entity": "businessunit", "guid": "8165f4a8-5730-4e2b-b120-6b4e71bfd0d7", "filter": "<condition attribute='parentbusinessunitid' operator='null' />" }, { "entity": "transactioncurrency", "guid": "f0e12181-1c4d-4d62-879f-17b1ce391b4f", "filter": "<condition attribute='isocurrencycode' operator='eq' value='USD' />" }]
Upsert Entity Record: Insert or Update entity record based on the filter condition specified. Primarily used for updating configuration records. However this is not a bulk insert task and can only be used to insert or update a single record. The task requires the below input parameters for execution:
Connection String*: Connection string to connect to the D365 Instance. Please refer
here for further details
Entity Name*: Entity Logical Name
Retrieve Record By: Select if the record has to be retrieved by Record GUID or by specifying the filter condition.
Record GUID (Conditional): This is required only if the record is to be retrieved by Record ID. Record will be retrieved based on the specified GUID.
Filter Condition (Fetch XML) (Conditional): This is required if the search has to be performed based on the fetch xml. Only the filter node from the fetch xml has to be specified. eg: <filter type='and'> <condition attribute='name' operator='eq' value='Administration' /> </filter>
Attribute Name/Value JSON array*: Holds the attribute-value pair that has to be updated for the selected record. Follow the below format to specify the attribute values [{ name:"accountid", value:"453234" },{ name:"accountname", value:"Contoso Industries" }]
The attribute type is not required to be specified. However, in case of partylist attribute the lookup type is required to be specified. [{ name:"accountid", value:"453234" },{ name:"regarding", value:"47cf9395-b066-43d6-b7cd-29f75df6e397", type:"account" }]
Create Record (if not present): On selection, record will be created if there are no matching records
Enable Access Team: Enable access team on D365 Entities. Use this task to enable it for single or multiple entities. The task requires the below input parameters for execution:
Connection String*: Connection string to connect to the D365 Instance. Please refer
here for further details
Entity List*: Entity Logical Name separated by comma. eg: account,contact,lead
Update Plugin Configuration: Updates the secure or unsecure configuration for single or multiple plugin steps. The unsecure configurations are updated as part of the solution import. However, if there are environment specific values to be updated then this task can be utilized. The task requires the below input parameters for execution:
Connection String*: Connection string to connect to the D365 Instance. Please refer
here for further details
Plugin Configuration Type*: Indicate if the secure or unsecure configuration has to be updated
Configuration Value*: Name-value pair for plugin step name in the format below: {StepName1:Value1,StepName2:Value2,StepName3:Value3}
Export Access Team Templates: Export the configured Access Team Templates from the source environment. The task requires the below input parameters for execution:
Connection String*: Connection string to connect to the D365 Instance. Please refer
here for further details
Output File*: The absolute path for the file that is required to hold the Access Team details. The file should be of type "json" and will be created if the file does not exist.
Import Access Team Templates: Create or Update the Access Team Templates. Details about the Access Team Templates are read from a configuration file. The task 'Export Access Team Template' can be used to generate the configuration file. The task requires the below input parameters for execution:
Connection String*: Connection string to connect to the D365 Instance. Please refer
here for further details
Export Document Templates: Export the configured Document Templates from the source environment. The task requires the below input parameters for execution:
Connection String*: Connection string to connect to the D365 Instance. Please refer here for further details
Retrieve Templates*: Indicates if all the templates or selected templates have to be exported from the source environment.
Template Names (Conditional): This is required only if the template is to be retrieved based on the template names. The names have to be specified in the format below: ["Template 1","Template 2","Template 3"]
Output Folder Location*: The absolute path of the folder that is required to hold the exported templates. In addition to the exported templates, a configuration file with extension of type "json" is created. This configuration file is later used to import the templates to the target environments.
Import Document Templates: Create or Update the Document Templates. Details about the document templates are read from a configuration file. The task 'Export Document Templates' can be used to generate the configuration file. The task requires the below input parameters for execution:
Connection String*: Connection string to connect to the D365 Instance. Please refer
here for further details