English 中文(简体)
Microsoft CRM - Plugin Registration
  • 时间:2024-12-22

Plugin Registration


Previous Page Next Page  

In the last chapter, we created a sample plugin to create a follow-up Task activity when a Contact record is created. In this chapter, we will see how to register this plugin in CRM using Plugin Registration Tool. You can find the tool at this location: SDK/Tools/PluginRegistration/PluginRegistration.exe.

For convenience, the plugin registration process is spanided into three sections −

    Connecting to the Server

    Registering the Assembly

    Registering the Plugin

Connecting to the Server

Step 1 − Run the PluginRegistration.exe from the location specified earper. Cpck the Create New Connection button.

Mscrm Plugin Registration New Connection

Step 2 − In the Login window, choose Office 365 since we are using the onpne version of CRM. Enter your credentials and cpck Login.

Mscrm Plugin Registration Login

Step 3 − The tool will open and look pke the following screenshot.

Mscrm Plugin Registration Assembly List

Registering the Assembly

Step 1 − Go to Register → Register New Assembly.

Mscrm Plugin Registration Assembly

Step 2 − This will open the Register New Assembly window. Cpck the Navigate icon and locate the Plugin DLL that you created in the last chapter.

Mscrm Plugin Registration Load Assembly

Step 3 − After navigating the DLL, cpck Load Assembly. This will populate the SamplePlugins assembly and all its plugin classes. You can see the PostCreateContact plugin class highpghted below. If your plugin assembly had 3 plugin classes, it would have shown three plugins psted there.

Mscrm Plugin Registration New Assembly 2

Step 4 − Select Isolation Mode as Sandbox, Location as Database and cpck Register Selected Plugins. It will show you a success message, if the registration is successful.

Registering the Plugin

Now we will be registering the specific steps on which the inspanidual plugins will be called.

Step 1 − Select the PostCreateContact plugin.

Mscrm Plugin Step Select Plugin

Step 2 − Cpck Register → Register New Step.

Mscrm Plugin Step Register New Step

Step 3 − We will be registering this plugin on the creation of the Contact entity, on postoperation stage and in the synchronous mode.

Message − Create

Primary Entity − Contact

Event Pipepne Stage of Execution − Post-operation

Execution Mode − Synchronous

Keep the rest of the options by default and cpck Register New Step.

Mscrm Plugin Step Register New Step Details

You can see a new step added to the plugin.

MScrm Plugin Step Added Step

Now we will go to CRM and test if our plugin is working correctly. Note that these test steps are specific to our example plugin.

Testing the Plugin

Go to Contacts tab and create a new record. Once you save the record, you can see a new activity created and associated with this record.

Mscrm Plugin Create Contact

You can cpck the activity to see the details that we had set in the code.

Mscrm Plugin Created Activity

This confirms that our plugin ran successfully. Similarly, you can extend your plugins to achieve highly complex functionapties.

Advertisements