Tavant Logo

Visual Workflow: Record Create

Share to

Application development no longer means learning to write code. Application development has reached new standards as there is a growing demand for business administrators to play the IT administrators role. Salesforce.com has also acknowledged this change and shows with a lot of development methods without coding. There is a new feature called visual workflow that provides point a click configuration for multi-step business rules.

Visual Workflow, built using Force.com’s Cloud Flow Designer, allows a user to create a flow for the complete business process without writing code. It can be a series of screens to enter the values for the process or an auto-launched one which runs or performs the functionality automatically.

Salesforce has various options to create or update records –in both standard and customized way.

We will see how to create a record using flow:

When a Cloud Flow Designer is opened, we can find different tabs available. The Canvas and Explorer tab display the elements that exist in the flow. The Palette tab displays the available element types that you can add to the flow by dragging them onto the canvas.

Every flow element has three settings in common: name, unique name, and description. These elements help in various functionalities From that we will understand the elements used to create a record in Salesforce.

For every single piece of data captured or displayed, need a variable to be set up in the flow, and set the Input/Output type of the variable as “Input only” or “Input/Output” or private. This defines the accessibility of the values. It is always recommended to follow a naming convention to identify easily which is meant for what.

Let’s say I have to create a case from account object. For this, we have to create a flow to perform the create functionality, then call the flow from the page and then finally a button to initiate the process.

Below are the elements used in our case:


This element is used as the UI element to show the fields and enter values for the same.

Record Create:

This element is used to create Salesforce record(s) using the field values that is individually set.

For more details on rest of the elements click here


Create >> Setup >> Create >> Workflow & Approvals >> Flows >> New Flow

  1.  Add screen element for input values for the case record to be created, in this scenario I have added two text fields to input the values for status and origin.

2.  Next step is to create the case record by assigning the values from the screen elements and the input variable     and map against the standard fields of the case in the ‘Records Create’ element.

3.  Make the screen as the start element and connect the two elements.

4.  Activate the flow

Now the flow is ready for the record creation. All we want is a triggering point to invoke the record creation from the standard page of the account record.

A custom page with standard controller as Account will be created with the below tag to connect the flow that we just created

<flow: interview name=”FlowName”>

Pass the current account ID to the flow to connect the case to be created with the current account.

<apex:param name=”varAccountId” value=”{!Account.Id}“/>

Now the page is ready to launch the flow.

Let’s create a custom button for calling the page just created and place the button on the page layout of the account object.

Tags :

Let’s create new possibilities with technology