Before going to Register plugin we need to know below points:-
- Why we need to Register plugin and What PluginRegistation Tool?
Previously we created SamplePlugin to stop the duplicate account creation in CRM system. To work our logic in CRM system we need to register SamplePlugin DLL by using PluginRegistration Tool.
- Where will get PluginRegistration Tool?
Under \SDK\Tools\PluginRegistration. If you are not yet download , download it.
- Before Register plugin need to Signin our project otherwise plugin registration tool will not allow to register. After sign-in need to build.
- In Solution Explorer, right click the BasicPlugin project and in the context menu select Properties.
- In the project properties, select the Signing tab and select the Sign the assembly checkbox.
- In the Choose a strong name key file: dropdown, select <New…>
- In the Create Strong Name Keydialog, enter a key file name and deselect the Protect my key file with a password checkbox.
- Click OK to close the Create Strong Name Key dialog.
- In the project properties Build tab.
- Press F6 to build the plug-in again.
- Using windows explorer, find the built plug-in at: \bin\Debug\BasicPlugin.dll.
Register plug-in Through Plugin Registration Tool:
To register a plug-in, you will need the plug-in registration tool
Connect using the Plug-in Registration tool
- After you have downloaded the Plug-in registration tool, click the PluginRegistration.exe to open it.
- Click Create new Connection to connect to your instance.
- Make sure Office 365 is selected. If you are connecting using a Microsoft account other than one you are currently using, click Show Advanced.
- Enter your credentials and click Login.
- If your Microsoft Account provides access to multiple environments, you will need to choose an environment.
- After you are connected, you will see any existing registered plug-ins & custom workflow activities
Register SamplePlugin assembly
- In the Register drop-down, select New Assembly.
- In the Register New Assembly dialog, select the ellipses (…) button and browse to the assembly you built in the previous step.
- For Office 365 users, verify that the isolation mode is sandbox and the location to store the assembly is Database.
- Click Register Selected Plug-ins.
- You will see a Registered Plug-ins confirmation dialog.
- Click OK to close the dialog and close the Register New Assembly dialog.
- You should now see the (Assembly) BasicPlugin assembly which you can expand to view the (Plugin) SamplePlugin.StopDuplicate plugin.
Register a new step
- Right-click the (Plugin) SamplePlugin.StopDuplicate and select Register New Step.
- In the Register New Step dialog, set the following fields:
|Event Pipeline Stage of Execution||PreValidation|
- Click Register New Step to complete the registration and close the Register New Step dialog.
- You can now see the registered step.