Codebeef
Codebeef

Reputation: 43996

Callbacks from MS Dynamics CRM to a webservice

We're building a system that is tightly integrated with a clients CRM install, and need to have a callback fired when an entity is updated, created or deleted. This callback will ideally send the entity name and id to an external service via a HTTP get request.

I've not found any docs online that help - can anyone point me in the right direction?

Upvotes: 4

Views: 533

Answers (1)

Matt
Matt

Reputation: 4686

You're looking for plugins: http://msdn.microsoft.com/en-us/library/dd393295.aspx.

You can register a plugin on Create, Update, Delete, etc. of an entity, and then run any custom code you'd like. You'll definitely have access to the entity name and the id, as well as fields that were updated, information on the user who initiated the call, etc.

Just know that in MSCRM 3.0 & 4.0, plugins run outside the actual database transaction, so it's possible the event could fire in CRM, but the plugin fails and the event still goes through. In MSCRM 2011, they run inside the transaction, and can stop the CRM event from happening if need be.

Upvotes: 5

Related Questions