'Delete dataverse tables, when migrating solution
In our PowerApps setup we have four environments: Development (Unmanaged) Build (Unmanaged) Test (Managed) Production (Managed)
We change the solution in development. When everything is ready for deployment we export an unmanaged solution to git. When we merge to our main branch, the pipeline takes over:
- Delete the solution from Build.
- Import new solution from git.
- Bump version.
- Export solution as managed.
- Upgrade solution in test.
- Upgrade solution in production.
This has the benefit of keeping the solution and the code in sync as well as verifying that the solution can be imported anew if everything goes sideways.
However, there is an issue: When deleting the solution from Build the Dataverse tables remain. Not only that, when importing the new solution they are somehow incorporated into the solution, so when it is exported in step 4 references to deleted tables reemerge. Step 5 then fails.
Is there a way to delete all table definitions belonging to a deleted solution? Doing it via REST calls is fine, as long as it can be done by some automated process.
Solution 1:[1]
If you firstly deleted the solution from the follow-up environment, your next step could be:
- task: PowerPlatformImportSolution@0
inputs:
authenticationType: 'PowerPlatformSPN'
PowerPlatformSPN: $(YourSPN)
SolutionInputFile: 'MySolution.zip'
AsyncOperation: true
MaxAsyncWaitTime: '60'
HoldingSolution: true
OverwriteUnmanagedCustomizations: true
You could start looking into the HoldingSolutions and how to work with that ;-)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Iona Varga |
