We are wanting to automate the deployment of our CRM solutions as much as possible, and have a good process in place using VSTS and the solution packager. CRM customisations are kept in a customisations project in Visual Studio and our CI process builds (re-packs) the solution for deployment to other environments.
We've come across a situation where we don't think we're going to be able to automate this particular metadata change.
We have two entities in a parent -> child relationship which we want to delete.
The child records are displayed on the parent entity form in an associated view.
The manual process would be something like this.
1.) Remove the associated view from the parent form.
2.) Delete the relationship between the entities.
3.) Delete the parent entity.
4.) Delete the child entity.
We have carried out these steps in dev, and written the code to carry out steps 2-4 using the API.
However, when we export the solution from Dev for deployment to other environments, the form is now longer part of the solution, because the entities have been deleted.
This means that we cannot programatically delete the relationship between the entities, because the form in our target environment still contains the associated view.
The only options I can think of are:
Manually update the form in all of the target environments. The defeats the point of having a CI process.
Writing a script to hack the XML of the form in all of the target environments. Don't like the sound of that much, although it is doable.
Can anyone think of any other solution to this problem?
*This post is locked for comments