Search This Blog

Dynamics CRM - Design Considerations - Plugin vs JavaScript

When we design Dynamics CRM application for certain requirement or activity or for validation, question comes up that what technique to choose in different scenario. Dynamics CRM provides different ways to implement same thing.

Design may vary based on below fundamental questions:

  • Does it require immediacy?
  • Is there a possibility that some other system is directly pushing data into CRM?
  • On demand action or validation, which may or may not require.

In most of the cases business requirements are very demanding and require immediacy where user can’t wait for screen to refresh for server round trip. In such cases JavaScript implementation are the best. Also is it best when your activity works in isolation within Dynamics CRM only and does not have any external system integration.

If there is a possibility that some external system can also push data into CRM directly using API and all validation and activities must be validated / executed for the data coming from external system, in such cases it is always advisable to implement it inside plugins. This way we can address cross cutting concerns and same code base can be reused for the data coming from external systems. The downside is user needs to wait for a screen refresh.

In some specific scenario where both the conditions are true that


  • User can’t wait for screen refresh
  • There is possibility that external system might be pushing data into CRM

In such scenario we can write an action in CRM and can consume those action on client side within JavaScript calls and on server side within plugin or custom workflow.

In certain cases, when activity or validation is not always mandatory and depends upon user action then it is always advisable to write such code inside a custom workflow so that it can be triggered on certain condition automatically or on some user action manually.