Process Builder: Auto Create a record

The purpose of this article is to discuss about Process builder. Process builder is generally available for use, after Spring’15 release. From today onwards I am going to start a series of blog post on Process builder, I will try to post at-least one article per week related to it.




What is Process Builder ?
Process builder is a combination of Flow and Workflow rule. In other word we can say that it’s a next level of Workflow rule, that allows us to automate your business process by creating Processes with point-and-click.
How to enable Process builder ?
Process builder is only available in Enterprise, Unlimited, Performance and Developer editions. After Spring’15release it will generally available for above mentioned editions.
Why Process builder?
Workflow rule has a few limitations like using WFR you can’t create child record, Post to Chatter or Auto submit record in Approval process. Let’s start with a business use case
Business Use case :-  Corey Eridon is working as System administrator in Universal Container. She receives a requirement to auto create a child case whenever a new case is created with Case Reason Breakdown.
Solution of above business requirement
To solve this requirement, we will use Process Builder. Whenever we create a Process using Process builder Salesforce auto create a Flow and Workflow rule (With an action) to fire it. At the end of this article I will show you how to view Flow and Workflow action created by System for Process. Follow the below instructions to create a Process for the above business requirement
1. Click on Name | Setup | App Setup | Create | Workflows & Approvals | Process Builder2. To create a new process from scratch, click on the New Button available on Process management page, A popup will open where you have to enter Name (Enter Create_Child_case_for_Breakdown as name)API Name andDescription as shown in the below screenshot
3. Once you are click on the Save button, it will redirect you to Process canvas. Click on Object node to add object and set the evaluation criteria, Please refer to the following screenshot for more details

4. The next step is to define Process criteria. For this click on Add Criteria node, enter Criteria NameSet filter conditions (Similar to Rule Criteria in WFR), as shown in the following screenshot

5. Now we have to add an Immediate action into the Process to create a case record. For this use Create a Recordaction, Please refer to the following screenshot for more details

Make sure that you have assigned data in the correct format, because Process builder obey Validation rule. If some fields are required by using Validation rule, then make sure than you have added those fields. Same time if some fields are required using Page layout, you can ignore those fields.
6. Final task is to activate your Process by clicking on the Activate button.
Now onwards if you create a case with Case Reason Breakdown, Process will auto create a child case for it.
Flow and Workflow action created by Process builder
1. There are two ways that I am aware of, to see the Flow generated by Process Builder for current Process, those are Package or Change Sets. Now I am going to create a package, don’t worry it is very easy. Follow the path to create a Package
2. Click on Setup | Build | Create | Packages and click on the New button, enter the Package Name, as shown in the following screenshot

3. Click on the Add button available under Component, as shown in the following screenshot

4. From Component Type drop-down select Flow, and click on the Process we have created, i.e.Create_Child_case_for_Breakdown as shown in the following

5. It will redirect you to the Flow detail page, see the Type i.e. Workflow different from normal (Flow orAutolaunched Flow). Now click on the Open link as shown in the following screenshot

6. It will open the Flow, which is generated by Process Builder for the Process we have created. There are two SObject Variables created by Process to pass old and New Id of record to Flow

7. To check Workflow action, use this URL https://gs0.salesforce.com/09M, change the Salesforce instance, as per your current organization instance. I have created a custom view to see additional details

8. If you click on the Edit link, it will look like the following screenshot

Note : – This is for learning purpose. Don’t delete any actions or Flows.

Post a Comment

MKRdezign

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget