About Actions: Microsoft Dynamics CRM Actions allows us to define our own custom events/messages, similar to existing standard events like create, update, and delete. Actions are designed using the CRM process editor or using the SDK and we can define parameters (both input and output) for these actions just like we have parameters for standard messages, for example if you want to use a Create message then it takes an entity object as parameter and returns a record's GUID as output. Once activated we can also register a plugin on it.
You can get more details about the action here.
Action Example: We will show how to create and call actions. Actions provide an option to define various types of input and output parameters, but here we will show use of an Entity and EntityReference Parameter. So let's see an example of creating a Contact from an Account, a very simple example for the demo. When creating the contact we want to use information like name, email and telephone from the account entity. Now to pass this information we have two options, we can either pass all these fields from the account to the contact one by one or we can simply pass an account entity object so that the required field can be collected from there. So let's create an action where we will use two input types of parameters, Entity and EntityReference. From the entity we will use the preceding fields and using entityreference we will get it of the sales person (we have created a custom lookup field on contact entity), using the following procedure to design the action.
Now let's say we want to use these parameters to create our contact record, so use the following procedure to create the contact record using these parameters:
So in the preceding example we showed that if we need to pass multiple parameters then we can use an Entity object instead of passing a field value one by one and the entity reference is used for passing a single entity reference instance.
HIMBAP | Contact US