Search code examples
pluginsworkflowdynamics-crmcrm

How to register a plugin in a solution


In MS Dynamics CRM how do we register a plugin or a workflow as part of a solution? whatever i register through registration tool, just goes to the root solution of the system.


Solution

  • Expanding on what @Henrik said, the process would be as follows. For the sake of this example, let's assume you have a single assembly (dll) with two plugins and each needs two steps.

    1. Register the assembly as usual with the Plugin Registration Tool.
    2. For each of the two plugins, register the two steps they require. This should leave you with four in total.
    3. Leave the Plugin Registration Tool and go to your solution in CRM. You will see two sections there: Plug-in Assemblies and Sdk Message Processing Steps.
      You will need both of these to fully register a plugin with your solution.
    4. Go to the Plug-in Assemblies section and use the Add Existing button. This will bring up a standard lookup dialogue that will let you select your assembly. Add it.
    5. Next, go to the Sdk Message Processing Steps section and use the Add Existing button to add any plugin steps you want as part of the solution.
    6. That's it. Your assembly, plugins, and steps are now part of the solution. Any step images that may exist are automatically added as part of the step so no need to worry about them.

    One caveat though is that assemblies must be stored in the database and not as files for this to properly work. There is no specific limitation on sandboxed plugins (unless deploying to CRM Online) but using those would simplify solution deployment.

    Finally, this walkthrough which was taken from the How To button in a solution.
    Walkthrough: Register a plug-in using the plug-in registration tool

    As for workflows, they need to be added in the Processes section of a solution. This section will cover workflows, dialogs, business process flows, and actions. As before, use the Add Existing button.