简体   繁体   English

Microsoft Dynamics CRM插件-通过托管解决方案停用或禁用插件SDK消息处理步骤

[英]Microsoft Dynamics CRM Plugin - Deactivate or disable plugin SDK message processing step via managed solution

I have introduced a plugin registered at Update SDK message processing step for my entity via a managed solution. 我通过托管解决方案为我的实体介绍了在Update SDK消息处理步骤中注册的插件。 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. 我可以将“自定义”窗口中的SDK消息处理步骤停用为非托管更改。 But if i export this as a managed solution, the changes are not getting reflected in solution.xml or customizations.xml files. 但是,如果我将其导出为托管解决方案,则更改不会反映在solution.xml或customizations.xml文件中。

SdkMessageProcessingStep node in customizations.xml file does not seem to have an attribute like - IsActive or IsEnabled. Customizations.xml文件中的SdkMessageProcessingStep节点似乎不具有-IsActive或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. 您可以将其作为解决方案导入后任务记录在客户的解决方案导入指南中。

Update 更新资料

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. 请在下面的文档链接中查看创建软件包的第5步,您可以在其中插入SDK代码。 Create packages for the Dynamics 365 for Customer Engagement Package deployer 为Dynamics 365 for Customer Engagement程序包部署程序创建程序包

For the SDK code refer here Programmatically Disabling the Plugin Step 有关SDK代码,请在此处以编程方式禁用插件步骤

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM