I played with the new version of the CRM Developer Toolkit and wasn’t able to find a way to register a plugin that handles the action using UI. The following post describes the workaround how to make it possible.
1. Create a Solution and add the CRM Plugin project inside:
2. Create the new plugin and register it to handle some available action (I used the creation of an account in post mode):
3. Open the class of your plugin and change the line
base.RegisteredEvents.Add(new Tuple<int, string, string, Action<LocalPluginContext>>(40, "Create", "account", new Action<LocalPluginContext>(ExecuteHandleCustomAction)));
to line
base.RegisteredEvents.Add(new Tuple<int, string, string, Action<LocalPluginContext>>(40, "slick_CustomActionsTest", null, new Action<LocalPluginContext>(ExecuteHandleCustomAction)));
4. Open RegisterFile.crmregister file that is located in your Dynamics CRM 2013 Package project, find the line that describes step of your plugin and change
<Step CustomConfiguration="" Name="HandleCustomAction" Description="Handles Custom Action" Id="00000000-0000-0000-0000-000000000000" MessageName="Create" Mode="Synchronous" PrimaryEntityName="account" Rank="1" SecureConfiguration="" Stage="PostOutsideTransaction" SupportedDeployment="ServerOnly">
to line
<Step CustomConfiguration="" Name="HandleCustomAction" Description="Handles Custom Action" Id="00000000-0000-0000-0000-000000000000" MessageName="slick_CustomActionsTest" Mode="Synchronous" PrimaryEntityName="none" Rank="1" SecureConfiguration="" Stage="PostOutsideTransaction" SupportedDeployment="ServerOnly">
5. Save the files and try to deploy your solution to the CRM server. If you’ve done all the steps properly you won’t get errors during deployment. If you want to ensure that the plugin was deployed properly on the open Plugin Registration Tool: