Hi,
I want to call a plugin from a custom workflow , is it possible? Earlier i had added a step that updated a field and called a plugin. Any help would be appreciated.
Thanks,
Abhishek
*This post is locked for comments
Hi,
I want to call a plugin from a custom workflow , is it possible? Earlier i had added a step that updated a field and called a plugin. Any help would be appreciated.
Thanks,
Abhishek
*This post is locked for comments
Make sure you mean plugin when you say plugin here. Plugins activate and run purely on events/messages like create, update, delete (and many more). Actions in CRM are more like method calls with inputs and outputs that you start manually. Workflows are also event driven (create, update, delete and so on) but most often run as an asynchronous process.
If you need to run the code you have put in a plugin without creating new entity instances, consider pulling the reusable code out as a custom workflow activity. That will let you perform the logic as a workflow step. If you want to trigger the exact same plugin and not reuse the code, perform the operation you have registered the plugin to. For example, if you have a pre-create plugin on the case entity, then create a case from your workflow.
If you instead want to perform some piece of business logic, like you would a method or procedure in code, then consider if using actions is an option for you.
I would not recommend chaining together different pieces of event handlers, as this is very likely to cause maintenance headaches. Imagine a Rube-Goldberg machine and you get my drift.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,235 Most Valuable Professional
nmaenpaa 101,156