简体   繁体   中英

PlugIn is not triggered when Workflow Update the record CRM 2011

I have a plugIn on an Entity and registered an Update Step. But when I update the Entity record through workflow then PlugIn is not being triggered. I have described the whole procedure of execution below.

  1. I have a PlugInA which starts executing when EntityA record is created.
  2. PlugInA create a record in another entity say EntityB which causes the PlugInB to be trigger.
  3. On triggering, PlugInB programtically trigger the Workflow say WorkflowA. WorkflowA wait for certain timeout date.
  4. On time out, WorkflowA update the EntityB record. So, In this case PlugInB should be triggered but that is not happening (PlugInB does not start execution).

Kindly let me know what can be the issue in the whole procedure described above.

Note that, I am using CRM 2011. Moreover, If I manually update the record in EntityB then PlugInB triggers

There are lots of possibilities why this would happen. Most likely whatever update you're doing in Workflow A for EntityB is not updating an attribute that is in the registration for PluginB to cause it to fire.

Other possibilities include WorkflowA not actually triggering, or PluginB triggering and maybe not doing anything.

Typically - what will cause a plugin not to fire is due to context depth and other items related to the async nature of workflows. If you intend to trigger a plugin from a workflow, then the context depth will be increased ... also you need to ensure that your plugin does not call itself over and over again so I would recommend using a pre-operation plugin that does not do depth checks and cannot re-trigger itself.

But - again - this is probably the context depth check in the plugin if you do it or something related to it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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