Custom Actions are a feature shipped with CRM 2013. The easiest way to explain the feature (for developers) is:
“You are able to create your own OrganizationRequest”
It is possible to use the CRM UI for creating an “Action” or you can write Code that creates a custom Action.
Key Points (SDK)
- Is defined using a Workflow entity record, similar to a real-time workflow.
- Can be associated with a single entity or be global, meaning not associated with any particular entity.
- Is executed in the core operation stage 30 of the event execution pipeline.
- Supports the invocation of plug-ins and real-time workflows registered in the pre-operation and post-operation stages of the event execution pipeline.
- Can have plug-ins or real-time workflows registered in the pre-operation or post-operation stages while the action status is Draft.
- Is available through the organization.svc and organization.svc/web endpoints, but not the organizationdata.svc (OData) endpoint.
- Always runs under the security context of the calling user.
- Record cannot be deleted while there are plug-in steps and other real-time workflows registered on the action.
- Can be invoked only by a web service method call, not directly from a workflow. However, the workaround is to write a custom workflow activity that invokes the action and add that to a workflow.
- Can optionally participate in the current database transaction.
- Does not support a scope where the execution is restricted to a user, business unit, or organization.
- Supports input and output parameters.
- Supports auditing of data changes.
- Is not supported with offline clients.
This feature will reduce plugin code in the future, because it is possible to encapsulate a sequence of operations in one request.
cheers