Skip to Content
Microsoft Dynamics CRM 2011 Unleashed
book

Microsoft Dynamics CRM 2011 Unleashed

by Marc Wolenik, Damian Sinay, Rajya Bhaiya
September 2011
Intermediate to advanced content levelIntermediate to advanced
1008 pages
24h 27m
English
Sams
Content preview from Microsoft Dynamics CRM 2011 Unleashed

IServiceProvider

The Execute method of the IPlugin interface has been updated and the only parameter received is the IServiceProvider, unlike the previous version where it was used the IPluginExecutionContext as parameter.

From this parameter, we can get the plugin execution context by typing this line of code:

IPluginExecutionContext context =(IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));

This change of the main parameter has a method, GetService, that enables you to get other services from the service provider, such as the context of the organization and the context of the tracer service. This enables you to interact with the current CRM trace to add debugging information for the execution of your plug-in. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microsoft Dynamics CRM 2013 Unleashed

Microsoft Dynamics CRM 2013 Unleashed

Marc Wolenik
Microsoft Dynamics® CRM 2011 Step by Step

Microsoft Dynamics® CRM 2011 Step by Step

Jim Steger Mike Snyder and Brendan Landers

Publisher Resources

ISBN: 9780132682084Purchase book