I have introduced a plugin registered at Update SDK message processing step for my entity via a managed solution. Now, I want to disable this step via a managed patch solution.
I am able to deactivate the SDK message processing step from Customizations window as an unmanaged change. But if i export this as a managed solution, the changes are not getting reflected in solution.xml or customizations.xml files.
SdkMessageProcessingStep node in customizations.xml file does not seem to have an attribute like - IsActive or IsEnabled.
Can you please let me know how to achieve this?
<SdkMessageProcessingSteps>
<SdkMessageProcessingStep Name="PreValidationUpdatePlugin: Update of entity" SdkMessageProcessingStepId="{a496dc85-87b3-e911-8199-000d3af937a2}">
<PluginTypeName>PreValidationUpdatePlugin, PreValidationUpdatePlugin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=11db56e249ade881</PluginTypeName>
<PluginTypeId>a7d27d5a-6d79-4d50-b898-d41b67ed6c89</PluginTypeId>
<PrimaryEntity>custom_entity</PrimaryEntity>
<AsyncAutoDelete>0</AsyncAutoDelete>
<Description>Update of custom_entity</Description>
<FilteringAttributes>name</FilteringAttributes>
<InvocationSource>1</InvocationSource>
<Mode>0</Mode>
<Rank>1</Rank>
<SdkMessageId>{20bebb1b-ea3e-db11-86a7-000a3a5473e8}</SdkMessageId>
<EventHandlerTypeCode>4602</EventHandlerTypeCode>
<Stage>20</Stage>
<IsCustomizable>1</IsCustomizable>
<IsHidden>0</IsHidden>
<SupportedDeployment>0</SupportedDeployment>
<IntroducedVersion>1.0</IntroducedVersion>
<SdkMessageProcessingStepImages>
<SdkMessageProcessingStepImage Name="Image">
<SdkMessageProcessingStepImageId>{bcff8b8d-87b3-e911-8199-000d3af937a2}</SdkMessageProcessingStepImageId>
<Attributes></Attributes>
<EntityAlias>Image</EntityAlias>
<ImageType>0</ImageType>
<MessagePropertyName>Target</MessagePropertyName>
<IsCustomizable>1</IsCustomizable>
</SdkMessageProcessingStepImage>
</SdkMessageProcessingStepImages>
</SdkMessageProcessingStep>
</SdkMessageProcessingSteps>
You have to use the Plugin Registration Tool on the target system to disable the plugin step. Solutions do not preserve the state of plugin steps, hence can't do that via Solutions.
You may document this as a post solution import task in your solution import guide for the customers.
I haven't done this but I believe you can disable plugin step as the part of a package deployer. See the step 5 of creating a package in the documentation link below where you can insert SDK code. Create packages for the Dynamics 365 for Customer Engagement Package deployer
For the SDK code refer here Programmatically Disabling the Plugin Step