- Actions are introduced in MSCRM 2013.
- Actions are the messages that can be defined for an entity.
- Out-of-box CRM provides a set of pre-defined messages for each entity like create, update, delete and others.
- Example for custom action would be approved; reject, delegate or any other that fits the business criteria.
- Through actions, we can create our own messages for any entity type
Here is an example for Action for all entities:
- Microsoft Dynamics CRM 2013 provides an option to create a Global Action. This can be created by selecting the entity name as None (global), as shown below.
- This can be useful for all the entities when we are using the same action for all entities.
Here is an example of Action for specific entity
- Navigation for the action is settings à process
- Select the category as action and entity from the drop down list.
An action screen will be displayed as shown below.
Enable Roll back: There may be cases when you have a code which runs out of the scope for CRM and you may not be able to roll back the action. The option of rolling back can be disabled for each action.
Direction: You can set either the Argument as an input or Output Argument to an action, by using direction.
Type: Below are the available types of arguments.
- To create input and output parameter click on icon.
- To enter output parameters selects the option as output and enter the details.
- Once the input and output parameters are set you can write the logic which is same as workflows.
- Input and output parameters are not necessary for every action. This has to define based on the requirement.
- Now the logic is defined for the action, you just need to activate it. Now this action is available for the developers and they can easily call this action from a custom code whenever it is required.
- The advantage of actions is to provide the ability to modify the logic easily whenever a business process is changed. A business user can modify this without the help of a developer.