Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

Will a Plugin get triggered from a SQL update?

Posted on by 35

I see a lot of questions around this, but nothing directly answers the question. I'm trying to find a Microsoft reference that answers this, but not having any luck.

I'm trying to figure out if a custom plugin will fire when SQL updates are made outside of CRM. So if there's a plugin that is trigged on a given field update, will that plugin fire if the SQL is updated directly via some other process outside of CRM, or will it only fire if the update uses the CRM SDK, rest services, or from within CRM?

Just based on experience, the plugins do not fire if an update is made outside of CRM. But I want to make sure I am not misunderstanding something here. 

  • jrothlander Profile Picture
    jrothlander 35 on at
    RE: Will a Plugin get triggered from a SQL update?

    Thanks for the reply and confirmation of this.  It would be nice if I could get a plugin to fire directly from a SQL update but I can use the SDK or Rest services to update a single field in CRM and fire off the plugin after the SQL finishes. So I can work around it.

    It doesn't take long when working in CRM to find things you need to do that are not supported. We hired Microsoft and PowerObjects to build an integration service for us. But it was taking over 7-hours to integrate about 10,000 records (very large records so you expect it to be slow) but we needed it to run in about 5-minutes. So we tossed that and rewrote it to hit SQL directly and it ran in about 15-minutes. We've redesigned it a few times over the past few years to get it near real-time. So for us, using the supported features and a 7-hour option, really wasn't an option. But over time we depend less and less on unsupported features and more and more on supported features. But for a few of our data intensive integrations, we are still dependent on hitting the SQL directly.  

  • Verified answer
    RE: Will a Plugin get triggered from a SQL update?

    Hi Jon,

    Yes, you are right, plugins will not be trigged if you execute a SQL update directly into database.

    Indeed there is no Microsoft documentation with explicit  statement regarding this because SQL updates applied directly against the database is not supported.

    However the most closely documentation to understand it would be this one: docs.microsoft.com/.../event-framework

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,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans