Posts

Showing posts from June, 2014

Developing a very basic Plug-in for Microsoft Dynamics CRM

Image
Developing a very basic Plug-in for Microsoft Dynamics CRM In this blog i am going to share how to develop a very basic plug-in for CRM step-by-step. Just follow each and every step and you will create your first Plugin very easily. 1. Download CRM SDK. This will provide you all the information, required SDK assemblies and many helpful samples. (Download Link for SDK : http://www.microsoft.com/en-in/download/details.aspx?id=40321 ) 2. Set up your plug-in project in Visual Studio. This will be a .NET class library. 3. Add References. At minimum, you will need Microsoft.Xrm.Sdk, obtained from CRM SDK. 4. Extend the class from Microsoft.Xrm.Sdk.IPlugin 5. Write your code (Below a very basic example is given after step 7. write codes in the code area in box shown)  6. At the project, sign the assembly. This is required in order to be able to deploy the plugin.  7. Compile the assembly and deploy using Plugin Registration Tool. (Use this link to know more about how to

Understand the Data Context Passed to a Plug-in (Microsoft Dynamics CRM)

In this blog i am going to share the definition and meaning of Data Context passed to a Plug-in (Microsoft Dynamics CRM) ==>  IPluginExecutionContext 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 context is contained in the System.IServiceProvider parameter that is passed at run-time to a plug-in through its Execute method. C# // Obtain the execution context from the service provider.             IPluginExecutionContext context = (IPluginExecutionContext)                 serviceProvider.GetService(typeof(IPluginExecutionContext)); When a system event is fired for which a plug-in is registered, the system creates and populates the context and passes it to a plug-in through the above mentioned classes and methods. The execution context is passed to each registered plug-in in the pipeline when they are executed. Each plug-in in the execution p
go to top image