Plug-in Sample Code
[Applies to: Microsoft Dynamics CRM 4.0]
Find the latest SDK documentation: CRM 2015 SDK
The following samples illustrate how to create and register plug-ins.
In This Section
Shows how to register a plug-in using the registration methods.
Shows how to obtain a list of those messages and entities that support plug-ins.
Online/Offline Plug-in Full Sample
See the SDK download package: SDK\Server\FullSample\OnlineOfflinePlugin. This sample shows how to write an online plug-in and an offline plug-in that work together to perform the same operation only one time.
Multi-Currency Plug-in Full Sample
See the SDK download package: SDK\Server\FullSample\MultiCurrencyPlugin. This sample demonstrates how to override the built-in RetrieveExchangeRate plug-in with a custom RetrieveExchangeRate plug-in.
Post Update Invoice Plug-in Full Sample
See the SDK download package: SDK\Server\FullSample\PluginPostInvoice. This sample contains a post-event plug-in for an invoice to update a custom field (Year To Date Revenue) to be the total amount of all invoices during the current fiscal year for the customer.
Pre Create Account Plug-in Full Sample
See the SDK download package: SDK\Server\FullSample\PluginPreAccount. This sample shows how to use pre-event plug-in on accounts to auto-generate the account number.
Plug-in Installer Full Sample
See the SDK download package: SDK\Server\FullSample\PluginInstaller. This sample contains an installer for a plug-in.