Registering, debugging and deploying plug-ins can be done using the plug-in registration tool.
1. Get the PluginRegistration.exe tool, located in the Tools\PluginRegistration folder of the SDK. Download the Microsoft Dynamics CRM SDK package.
2. Obtain a system user account on a Microsoft Dynamics 365 server.
3. User account must have the System Customizer or System Administrator role.
A. Connecting to the Server
B. Registering the Assembly
C. Registering the Plugin
A. Connecting to the Server:
1. Run the PluginRegistration.exe from the location specified earlier. Click the Create New Connection button.
2. In the Login window, choose Office 365 for online version of CRM. Enter credentials and click Login.
3. The tool will open and will look like the following screenshot.
B. Registering the Assembly:
1. Go to Register → Register New Assembly.
2. This will open the Register New Assembly window. Click the Navigate icon and locate the Plugin DLL of plugin project.
3. After navigating the DLL, click Load Assembly. This will populate the SamplePlugins assembly and all its plugin classes.
4. Select Isolation Mode as Sandbox, Location as Database and click Register Selected Plugins. It will show a success message, if the registration is successful.
C. Registering the Plugin:
1. Select the desired plugin.
2. Click Register → Register New Step.
3. Registering above sample plugin on the creation of the Contact entity, on postoperation stage and in the synchronous mode.
A new step added to the plugin.
Go to CRM and test if our plugin is working correctly.
Testing the Plugin
Go to Contacts tab and create a new record. Once the record is saved, a new activity is created and associated with this record.
Click the activity to see the details that were set in the code.