Reputation: 3321
I need to update Dynamics CRM 365 (on-premise) plugins in a repetable way using Octopus Deploy, but to do that I need to find a way to script this update instead of doing it manually.
Is it possible to do it using the CRM SDK or directly using Powershell?
Upvotes: 0
Views: 1730
Reputation: 417
Yes, it is possible to perform plugin registration with the CRM SDK and/or Powershell.
This can be achieved by creating/updating/deleting certain records (entity logical names are pluginassembly
, plugintype
, sdkmessageprocessingstep
, and sdkmessageprocessingstepimage
) with suitable attribute values as well as matching references to other plugin-related entities like sdkmessage
and sdkmessagefilter
.
At my company, we have developed our own automatic plugin registration through code, which can be performed by running a simple script. This script can also be run by a build server (like Octopus or VSO), to automatically create/update/delete the plugin registrations in CRM to match those found in our code.
You can check out the source code for it (written in F#) on our GitHub.
Upvotes: 6
Reputation: 7928
Dynamics CRM plugins are part of the CRM Solution. What you are looking for is a way to deploy CRM Solutions.
When planning for deployment decide first if you are going to deploy your solution in managed or unmanaged form. Then decide for a tool. The CRM SDK has a deployment tool. There are also PowerShell scripts available. (See on TechNet: Administer the deployment using Windows PowerShell and Deploy packages using Dynamics CRM Package Deployer and Windows PowerShell.)
Upvotes: 0