When working with Dynamics 365 Portals, there is sometimes the need to run multiple portals of the same type out of the same organization (e.g. multiple community portals). This can be a challenge to setup because the provisioning process in the Dynamics 365 portal add-on only allows the data for a given portal to be imported once.
The Adoxio.Dynamics.DevOps PowerShell module contains a little known function which helps to work around this limitation by facilitating the modification of a Configuration Migration Tool data file so that it can be imported into an organization while avoiding conflicting with any existing data already in the organization.
The Adoxio.Dynamics.DevOps PowerShell module has a function called
Edit-CrmDataFile that can be used to duplicate a website for import into an existing organization. It accomplishes this by generating new IDs for all of the records in a Configuration Migration Tool XML file, so that the records are considered new unique copies when importing the data into the same organization which they were exported from.
Here are steps to take to perform this procedure:
- Install the Adoxio.Dynamics.DevOps module using the instructions on the GitHub project page.
- Export a configuration data zip file of the portal entities using the Configuration Migration Tool using a schema file containing the portals entities. There are instructions specific to doing this at Migrate Dynamics 365 for Customer Engagement Portal configuration.
- Unzip the data zip file after the export is complete.
- Run the
Edit-CrmDatafunction from Adoxio.Dynamics.DevOps against the data XML file within the extracted folder to replace it with a new version with new GUIDs, using the -ReplaceRecordIds switch:
Edit-CrmData -Path <path-to-xml-file> -Destination <path-to-xml-file> -ReplaceRecordIds
- Zip the folder up again with the modified data XML file so that it can be imported.
- Import the updated data zip file using the Configuration Migration Tool