Wednesday, 19 July 2017

Workflow vs process builder

Many times we come across situations where we have to decide whether i should use workflow rules or process builder.
Below are few comparisons between them to help you to decide over the two.

Workflows :-
1. Can be used to fire an action when any record is created or updated.
2. Can be used to fire an action when the record subsequently meets the workflow criteria
   Eg:- We have a workflow rule which should fire an action when account type is "Hot".
   If we select "subsequently meets" option then the workflow will fire when account type field is changed from some value to "Hot".
3. To update a field on the record initiated the workflow or to update the parent record field.
4. To send email alerts when the workflow is fired.
5. To create a task on the record which initiated the workflow.
6. To create an outbound message.
   Outbound message are single line integrations to the third party system where we specify the      URL   and select the fields whose values we want to send along with the URL.
7. You can reuse already created workflow actions. 

Process Builder :-
1. Can be used to fire an action when any record is created or updated.
2. Subsequently meet the criteria option is not possible. you need to write formulae logic with ISCHANGED functions.
3. You can create IF ELSE condition logic in process builder and can schedule the actions.
4. Can do field updates for the records which initialted the process builder. Also you can update the field on child recrods as well as parent records.
5. You can call an apex class method from process builder. The method should be defined as @invocable method.
6. You can send email alerts from process builder.
7. You can initiate a flow from process builder provided the flow should be an autoflow. Auto flows are thos visual flows which doesn't have any screen in it.
8. You can initiate a an approval process associated to the record object.
9. A record can also be created from process builder.
10. You can create a chatter post form process builder and post it as user post, group post, record post etc.
11. You can initiate one process builder from another process builder.
12. you can use quick actions for the record object.

I hope this helps you to decide whether to use process builder or workflows.

Create record in lightning

With the advancement of lightning, we are getting introduced to new features of lightning that helps in creating a better functionality in ...