I'm experimenting with Actions and Workflows for some processes we need to run in CRM. And I have to admit, I'm having a tricky time figuring out when to use an Action - I haven't yet seen what they can do that a Workflow can't. Does anyone have any examples of what an Action can do that can't be done elsewhere, and/or any other circumstances where one would specifically want to use Actions instead of Workflows?
One page that I saw had an example of Creating a Contact from an Account, but that seems to be fully able to be done in a Workflow as well. I wonder if there used to be more of a difference, say in 2013, before features were added more recently?
Your absolutely right it can be confusing as to when to use an action vs a workflow. I personally like actions as compartments of functionality meant to reduce the amount of code or duplication in your workflows. It is worth noting that actions can't trigger off of the same rules of a worklow unless your using java-script or something.
For example if you had the requirement of when an account or contact gets reassigned we need to send an email to the newly assigned person and then create a task to follow up for this person in 5 days. In this case this would be two seperate processes; one for the account entity and one for the contact entity. Instead of having the same logic duplicated in both of these workflows; i'd rather build a simple action that does this sending of email + creation of task. I'd then take the new action and execute it from each workflows. This is a very simplistic answer of course but I try to use actions to minimize duplication or for business functions that will need to be repeated.
I hope this helps!
For your other examples of compartmentalizing code/logic, I do like to do that, but couldn't you use a child workflow in exactly the same way? (i.e. have a workflow that does the email + creation tasks, then call it as a child workflow from multiple other workflows?)
Well there are differences in terms of the custom actions that can take parameters in like entities or entity collections etc... This is where I see some of this main stream value for the Actions.
Your correct that actions can be called from Workflows and that makes sense but actions cant be triggered like on an account creation like a normal workflow would be able to.
a workflow requires always a record as starting point (created, updated, deleted or on-demand), an action no.
Let's say you create an action that create an email to the manager, the action is not binded to a crm record, can be included or not inside a workflow, can be called by c# code, can be edited by the crm built-in editor. It's a piece of server side code with a designer.
Ah - that makes perfect sense. Thank you!!
from my view, most of the business logic can be written in action and can be called from Plugin or workflow or from java script
so that in future if business logic has to be changed , we can do changes directly from action and it will get reflected in all the other triggering processes
Is there any difference between action and custom action?
Refer this: msdn.microsoft.com/.../dn481600.aspx
You can say you don't need to write code for the logic you have set in action. For example, you want to update case on the condition you want and not on any record creation or updation, then you simply go and create action which will update case. Now go to your code(plugin,java script), and instead of writing logic to update case, YOU CALL YOUR ACTION.
I too had a similar confusion and we used actions to reduce the amount of duplicate and similar code to be used across many entities
In my case we had to do Cloning functionality and many custom entities need to have this feature at that time we wrote a generic cloning action code and on each entity which required cloning put up a button and called this Cloning action
in that way we used
Please check my video-
Dynamics of the community have been upheld for the entertainment of the kids. The stage is set forth for the movement of the online assignment for all serving officers in the town. The community is fully engrossed in the ambit for the reforms and all challenges for the people.
Business Applications communities