Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

How to Call a plugin from a Custom workflow in CRM 2015

Posted on by 665

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

  • Suggested answer
    Henrik Gundersen Profile Picture
    Henrik Gundersen 978 on at
    RE: How to Call a plugin from a Custom workflow in CRM 2015

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans