CRM 2015: How to register a plugin for a Global Custom Action using CRM Toolkit

Scenario: I have a custom action that is registered against global (None), but I want to create a plugin that will execute my logic when the action is invoked. These are the steps I took to register the plugin using the CRM toolkit.

  • Create a plugin against any entity in the system, I prefer to use the system user entity. Select the normal plugin setting i.e. Message, Pipeline Stage etc.
  1. 1Then modify the plugin created in step 1, first update the message to the name of your custom action, secondly update the name of the entity to an empty string

2

2.1

3

  • Open the RegisterFile of the CrmPackage and update the plugin created in step 1. Firstly update the MessageName to your custom action name, secondly remove the PrimaryEntityName=”systemuser” tag completely and save the file.

4

4.1

4.2

4.3

  • Rebuild your project, deploy and test.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Workflow Elements by Aiden Kaskela

Business Solutions (CRM) MVP, Contractor, Evangelist

MSDYNAMICSBLOG BY DEEPESH

Real Experiences from Analyzing, Architecting, developing and working with Dynamics CRM, Dynamics 365 and sometimes .net

Mark Margolis's Blog

It's about Software, CRM, Product Development and sometimes Food.

GT // CRM

Gareth Tucker on Microsoft Dynamics CRM

Donna Edwards

Sharing my Journey with Dynamics 365

The WordPress.com Blog

The latest news on WordPress.com and the WordPress community.

%d bloggers like this: