Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Sales forum / Plugin vs custom Workf...
Sales forum
Answered

Plugin vs custom Workflow (codeActivity)

Posted on by Microsoft Employee

In which scenarios shall we go for a Plugin and which scenarios shall we opt for a custom Workflow (iworkflow) 

Categories:
  • Suggested answer
    Wahaj Rashid Profile Picture
    Wahaj Rashid 11,319 on at
    RE: Plugin vs custom Workflow (codeActivity)

    Hi,

    The comparison and points are for Code Activity and plugins. Where I say workflow it means Custom Code Activity.

    You need to think in perspective of workflow, because the Custom Code Activity is used in a workflow.

    When it comes coding part, both look similar (except parameters). Both are .Net class libraries.

    Only thing, differentiates them is custom code activities works in a workflow (process) and registered only for limited events. However, plugins can be registered on more supported events.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Plugin vs custom Workflow (codeActivity)

    Hi Wahaj Rashid,

    thanks for the detailed explanation,

    I was particularly looking for the difference between an codeActivity workflow (which we build using c# code) and a plugin. from the development perspective, is there any advantage choosing one over the other ?

  • Verified answer
    Wahaj Rashid Profile Picture
    Wahaj Rashid 11,319 on at
    RE: Plugin vs custom Workflow (codeActivity)

    Hi,

    Thank you for your query.

    When it comes to coding possibilities, I do not see any limitation in one or other.

    Your decision should depend on on following:

    • Manageability: it is easier to manage a workflow than a plugin. Lets assume, you calculate loyalty points using a plugin based on customer spend. Now, you need to add an extra condition to exclude wholesale customers from Loyalty calculation. If it is a plugin, you need to update the code. If it is a workflow, you might just add an check condition before you custom workflow step.
    • Triggers (Execution pipe-line): workflows are triggered on limited events (Create, Update, Delete, State Change, On-Demand). However plugins can be executed on all supported messages (events), like Retrieve. Assign, etc..

    In my opinion, Custom Code Activities should be preferred if you do not need to register your code on a special message. However, if your requirement is to intercept more complex events (like GrantAccess, RetreiveMultiple, you have to opt for Plugin.

    Also, plugins can be used for more generic tasks as you can register same code with multiple entities (if your code handles it).

    Here is a similar thread for your reference:

    https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/200790/difference-between-custom-worklfow-and-custom-plugin#:~:text=A%20Custom%20Workflow%20Activity%20Plugin,configure%20some%20logic%20through%20the

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,277 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,126 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans