M2L4Dynamics 365 CRM Plugin basics IPluginExecute IServiceProvider Depth Explained











>> YOUR LINK HERE: ___ http://youtube.com/watch?v=faCh4fylov0

Dynamics 365 CRM Plugin basics | IPlugin.Execute | IServiceProvider | Depth | Target - Explained • Microsoft Dynamics CRM 365 Plugin Development Course Link: https://bit.ly/2YfV3sd • Microsoft Dynamics 365 - Custom Workflow Development Course Link: https://bit.ly/2AWKp0L • IPlugin.Execute(IServiceProvider) Method • When a particular event occurs in Microsoft Dynamics CRM, such as “create of a contact” or “update of an account”, the Execute method is invoked for any plugins registered on the event. This method includes a single serviceProvider parameter which provides useful service information about the execution of the plugin. • Microsoft Dynamics CRM 365 Plugin Development Course Link: https://bit.ly/2YfV3sd • Microsoft Dynamics 365 - Custom Workflow Development Course Link: https://bit.ly/2AWKp0L • The types of service objects available include the following: • • IPluginExecutionContext • • IOrganizationServiceFactory • • ITracingService • The IPluginExecutionContext service object is the most useful of the three and provides contextual information to the plugin at run-time. It includes details about the user who triggered the plugin event as well as transactional information handled at the platform layer. The following code can be used to obtain the execution context from the service provider: • IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext)); • The IOrganizationServiceFactory service object allows us to create an instance of the organization service which can be used to define and execute various platform requests. The following code can be used to achieve this: • IOrganizationServiceFactory factory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory)); • IOrganizationService sdk = factory.CreateOrganizationService(context.UserId); • In the example above, we pass in the GUID of the user who triggered the plugin event, which is obtained from the IPluginExecutionContext. Alternatively, we can pass in the GUID of another CRM user, or pass in a null value to execute the plugin logic under the system context. • Lastly, the ITracingService allows us to trace the plugin execution flow and any variables for debugging purposes. For more information, please read my post on Debugging Dynamics CRM 2011 Plugins. • IPluginExecutionContext is where all the contextual information is brought to your code. InputParameters and OutputParameters member contain for example the record the plugin is being fired upon, the pre- and post-image, the handled message (The actual data depends on how you registered the plugin: pre VS post, the exact message, online or offline...) • IOrganizationService object allows you to query the Organization Service. The most common usage scenario is CRUD operations (Create, Retrieve, Update, Delete: beware of deadlocks) • There you have it, an introduction to the various service objects that we will be working within our journey to create plugins for Microsoft Dynamics CRM. In my next post, we will take a closer look at the IPluginExecutionContext. • IPluginExectionContext: • Defines the contextual information passed to a plug-in at run-time. It contains information that describes the run-time environment that the plug-in is executing in, information related to the execution pipeline, and entity business information. • The execution context is passed to a plug-in at run time in the System.IServiceProvider parameter of the Execute method. You can obtain the context from the service provider as shown in the following plug-in code. // Obtain the execution context from the service provider. • IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof( IPluginExecutionContext)); • IOrganizationService Interface: Provides programmatic access to the metadata and data for an organization. • Microsoft Dynamics CRM 365 Plugin Development Course Link: https://bit.ly/2YfV3sd • Microsoft Dynamics 365 - Custom Workflow Development Course Link: https://bit.ly/2AWKp0L • • Subscribe for more: https://goo.gl/wwznrB • #dynamixacademy365 #dynamics365 #microsoftdynamics • Share this video with a friend:    • M2L3: Microsoft Dynamics 365 Plugin E...   • Watch next – Microsoft Dynamics 365 Interview Questions Answers: https://bit.ly/2EcNjN6 • Recommended Playlist – What's New in Microsoft Dynamics 365? New Features in V9.0 https://bit.ly/2LMRVQl • You can also watch our Videos on playlist: • History of Microsoft Dynamics 365: https://bit.ly/2w0uwjL • Microsoft Dynamics 365 - Custom Workflow Development Course: https://bit.ly/2w1Ixhh • Microsoft Dynamics CRM: https://bit.ly/2WPhcdF • Microsoft Dynamics 365 Business Central Introductory Course: https://bit.ly/2Q8s2cm • Plugin Development in Microsoft Dynamics 365: https://bit.ly/2VwIDYm • Let’s connect: • Instagram: https://bit.ly/2YBdchI • WhatsApp: https://bit.ly/2JIN7Jf • Twitter: https://goo.gl/d84Qw9 • Facebook: https://goo.gl/UQH3Eg • LinkedIn; https://bit.ly/2VwtOoO

#############################









Content Report
Youtor.org / YTube video Downloader © 2025

created by www.youtor.org