Search code examples
c#pluginsdynamics-crmmicrosoft-dynamics

Register a Plugin on a Entity when a Solution is imported in Microsoft Dynamics 365 CRM


I have a use case in Dynamics CRM, where there is a Plugin inside a solution. Once the solution is imported successfully, the Plugin must be automatically registered to a particular Entity.

Any help would be appreciated.

Thanks in advance.


Solution

  • using web you have the option when you import solution as below

    enter image description here

    If you wish to do it programatically

    You need to set the property PublishWorkflows to true

    ImportSolutionRequest request = new ImportSolutionRequest();
    request.PublishWorkflows = true;