How to create a new plugin in MS Dynamics CRM 4.0

How to create a plugin in MS CRM 4 and deploy

In this tutorial we will be using MS Visual Studio 2013 to create a plugin using C# and deploy it to CRM 4. We want create a plugin which fires whenever a new letter is created.

First thing open Visual Studio 2013 and create a new project of type class library and select .Net Framework 3.

Add a new class and give it a name i.e. LetterCreateUpdateTestPlugin.cs

Then we need to add references to required SDK, in our case

microsoft.crm.sdk

microsoft.crm.sdktypeproxy

microsoft.xrm.client

You can find these dlls in SDk folder (you can download crm 4 sdk from MS website)

We also need to add a reference to

System.Web.Services

You can see full list of added references below

Now we need to add some code to our class

Next step is to add a signed assembly, to do this go to project properties, signing, tick the box ‘Sign the assembly’, select new, and give it a name

Now build the project and then deploy it to CRM server using CRM plugin registration tool (this can also be found in CRM SDK)

Once deployed you should be able to see your plugin working

Comments are closed.