web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Limitations of CRM Plugins & web services (CRM Online)

(0) ShareShare
ReportReport
Posted on by

Hi,

I am working on an Enterprise Service Bus project where one of the systems from which we pull data in Dynamics CRM Online.

We are wondering which approach is better - pulling data from CRM with custom jobs on a regular basis (say 2 hours) or sending the data using a CRM Plugin calling our APIs (on demand). So where can I find the limitations for these two approaches in the context of CRM Online?

In the context of CRM Plugin (on demand approach):

- Can an external API service be called from a CRM Plugin? Are there any requirements for the API service, in order for it to be called successfully? Can a CRM Plugin connect to an MS SQL DB Server and write date in some tables directly?

In the context of custom jobs using CRM services (periodic calls):

- Are there any limitations when calling a CRM Online REST service? What are the requirements for the API service, in order for it to call the CRM services successfully?

Thank you in advance,

Evgeni Dyulgerov

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Dynamics365 Rocker Profile Picture
    7,755 on at

    You can call external API from Plugin but I suggest to go for custom workflow activity as rest call are Async.

    You can not call Database from Plugin or workflow.

  • Suggested answer
    Kokulan Profile Picture
    18,054 on at

    Hi

    If the Data Sync is one way, pushing from Plugin calling external API is better for the following reason

    01. The update is almost real-time

    02. There wont be any batch process so no single point of failure

    03. Based on my experience with scheduled tasks, on-demand is always better if its possible.

    One negative side to directly calling the API from plugin is that it may hold-up the UI if its Sync plugin and that will affect the user experience and performance.

    I had similar experience and here is what I did to solve the problem

    01. I created an entity in CRM to queue all the updates  - In your case, you could call this intermediate entity as -> ESB Queue or something along the line

    02. I then created a workflow that triggers on Create on this queue entity.

    03. In the Workflow I used a Custom Workflow Activity (CWA) I created to communicate to external API.

    Your plugin will just created a queue record in the custom queue entity mentioned above and the workflow will trigger asynchronously and push that via API

    Can an external API service be called from a CRM Plugin? Yes you can call from Plugin or CWA

    Are there any requirements for the API service, in order for it to be called successfully? REST API is preferred over WCF or ASMX.  As long as you create your API to be  RESTful, no special requirement to call this from Plugin or CWA. One thing to note, you cant use any third party libraries in the plugin or CWA as the ILMerge is not supported by CRM Online anymore.

    Can a CRM Plugin connect to an MS SQL DB Server and write date in some tables directly? No CRM Online cannot connect to MS SQL Database directly.  You could have the DB connection in your API and let CRM call your API to perform any operation or Create an Azure function that can talk to DB and call the function from Plugin.

     

    About API Limit : If you call CRM API over 4000 times within 5 minutes, you may get error, please refer to the following

    https://community.dynamics.com/crm/f/117/t/316019

    https://community.dynamics.com/crm/f/117/t/317862?pi61802=1#responses

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans