WaelHamze / dyn365-ce-vsts-tasks

VSTS Extension for Dynamics 365 Customer Engagement
https://marketplace.visualstudio.com/items?itemName=WaelHamze.xrm-ci-framework-build-tasks
GNU General Public License v3.0
117 stars 56 forks source link

Migration Import Task not making use of UpdateCompare Attribute on Schema File #206

Open mrmwink opened 4 years ago

mrmwink commented 4 years ago

Si,

So I am using the tool for our CI via DevOps and using the "MSCRM Import Configuration Migration Data" task. This generally works fine but today we had an issue where we have multiple instances of a record with the same name! having checked the schema it is correctly set to use the ID as the compare item so the data_schema.xml file has the UpdateCompare attribute correctly set. If I use this file with the Migration Tool from MS it correctly imports all the records, yet the deployment task appears to be ignoring this attribute and using the name field for the entity to find a match and therefore is updating the record it "thinks" is the correct one when it should be creating a new record as the guid is different.

Using Task Version 12.* and we're on latets April Wave 1 updates of D365 CE online.

Thanks

Mike

WaelHamze commented 4 years ago

@mrmwink

The task actually uses the powershell module to import the data: https://www.powershellgallery.com/packages/Microsoft.Xrm.Tooling.ConfigurationMigration/1.0.0.53

This may have a different behaviour than the config migration tool itself via the UI.

I suggest you check what version of the above is being used in the tool installer task. You could try overriding it to the latest version to see if it fixes the problem...

Failing that you could try to use the powershell module on your developer machine. If you can replicate the problem then you will need to raise a case with MS.