Blog

Using Workflow to create followup tasks or reminders is a common use case. It is also simple to setup, just create a workflow rule with a rule trigger date a number of days in the future. Say we wanted to have a followup task generated 5 days before the Opportunity close date. This is easy, but standard workflow comes with a limitation, merge fields cannot be used for field values. This means that all of the tasks created would have the same subject and description. In this article we will look at how Process Builder can be used as an alternative, to create Task Records with merge fields.

First lets review how it would be done with Workflow. First we create the workflow rule with a time trigger 5 days before the Opportunity:Close Date.

opp-time-trigger

Then we configure the workflow task that should be created.

opp-task-creation

So, with a few minutes of work, we have our time dependent workflow setup to create a task for every Opportunity, to create a task for the Opportunity Owner, to remind them to followup as the close date of the Opportunity is approaching.

opp-time-workflow-3

Great. Job Done? Well let’s have a look at the result. As you can see below, the Tasks are created, but they all have the same subject. Although you can see what Opportunity they are related to and the Account, it would be useful to have more information in the task subject and comments about the opportunity, instead of the three tasks related to three different opportunities having the same subject and description. This limitation was recognised way back in 2008 where it was raised as an idea here: Merge Fields in Workflow Tasks

Now that Process Builder is available, there is an alternative. Let’s see how it can be used to create tasks with merge fields. Here is the view of the Process. The object is Opportunity and the process will start when a record is created or edited.

pb-choose-object

pb-flow-diagram

The scheduled action is defined to defined to execute 5 days before the Opportunity Close Date.

pb-execute-time

Now we get to the interesting part. The ability to create a Task record with Merge Fields. As you can see use the ‘Create a Record’ action and choose Task as the Record Type. We then can set any of the Task object fields with values, that can be Reference, Picklists or Formulas. To create the record and link to the related Opportunity, we must set the ‘Assigned To ID‘ field using a reference to the Opportunity Owner field. Not shown in the screenshot, but critical to linking the task to the Opportunity is setting the ‘Related To Id‘ to the Opportunity Id. If we don’t do this, the task will be created with the Opportunity Owner as the owner of the task, but not linked to the opportunity. We set the Priority and Status using the Picklist values. The subject is where we can get creative and build up a string that refers to values in the Opportunity Record. In this case the formula includes the Opportunity Type (to know whether it is New Business or Existing Busines), the Opportunity Name and the Opportunity Amount, so we have some idea of the size of the opportunity, all from the Task Subject. If there is too much to fit in the subject, we can also use the Description field.

pb-formula-create-task

Once Opportunity records are created and have a pending scheduled action, they will be visible as a Paused Flow Interview.

pb-paused-waiting-interviews

The final result, showing the tasks that have been created with merge field values from the Opportunity.

pb-merge-field-tasks

What Certification are you studying for now?

Focus on Force currently provides practice exams and study guides for sixteen certifications

Merge Fields in Salesforce Tasks

Using Workflow to create followup tasks or reminders is a common use case. It is also simple to setup, just create a workflow rule with a rule trigger date a number of days in the future. Say we wanted to have a followup task generated 5 days before the Opportunity close date. This is easy, but standard workflow comes with a limitation, merge fields cannot be used for field values…. Read More

Merge Fields in Salesforce Tasks

Single vs Multiple Sales Processes in Salesforce

  How Many Salesforce Sales Processes Do You Need?Are you contemplating whether to have one or set up multiple sales processes in your Salesforce Org? Prior to determining whether you need a single Sales Process or multiple Sales Process it is worthwhile to look at the definition of a Sales Process without reference to Salesforce:“A defined set of repeatable, interrelated activities from market awareness through servicing customers that allows communication of progress… Read More

Single vs Multiple Sales Processes in Salesforce

Getting a Salesforce Job

Salesforce Jobs I recently sat down and had a chat with Stuart Smith and Bradley Bilinsky, two business managers at Talentforce, an Australian recruitment company that specialize in Software as a Service roles, including Salesforce. One point of difference that Talentforce has from other recruiters is that they also run the Sydney Salesforce User Group, so they are active in the community. Stuart and Brad shared their thoughts on the… Read More

Getting a Salesforce Job

Powering your Salesforce reports using the PARENTGROUPVAL function

  How to Use the PARENTGROUPVAL functionThe ParentGroupVal function is one of the lesser known features of Salesforce reporting. In this article you will learn how to create some key metrics for summary reports by using the PARENTGROUPVAL function within a summary, joined or a matrix report. The function obtains the summary value from a parent group, which is a grouping that is a level above the current grouping. The syntax… Read More

Powering your Salesforce reports using the PARENTGROUPVAL function

Salesforce Custom Related List using jQuery

In the previous article we created a custom account interface by using Visualforce, in this article we’ll extend the functionality by creating a fully custom Opportunity related list. The Opportunity related list will be replaced with a custom table, and it will support: ✓ Pagination ✓ Filtering ✓ Sorting ✓ Quick filtering open Opportunities In order to implement this we need four steps: STEP 1: Create an Apex controller extension… Read More

Salesforce Custom Related List using jQuery

Focus on People: Danielle Tonkin — From Admin to Consultant

Although most Salesforce Administrators are quite happy with their job, I’m sure there are a number who have an interest and aspiration to become a Salesforce consultant. Danielle Tonkin is one of those that made the transition from Admin to functional consultant. Here she shares with us what it is like to work as a Salesforce consultant, the challenges, successes and her tips for those interested in following her Salesforce… Read More

Focus on People: Danielle Tonkin — From Admin to Consultant

Visualforce Tabbed Interface

Using Visualforce to build a tabbed user interface In this example we will override a standard view with a few lines of Visualforce to build a tabbed interface. Use case: Customize the interface for the Account object using Visualforce tabs. The following tabs should be available: Detail – Display general information about record. Inline edit feature should be supported; Contacts – Related Contacts list should be displayed in this section;… Read More

Visualforce Tabbed Interface

Salesforce Global Picklists

Global Picklists One of the most voted ideas in the Salesforce IdeaExchange forum was to be able to create a picklist that can be shared across objects. Shared Picklist Idea Salesforce delivered the idea in pilot as of Winter ’16, and is now in Beta for Spring ’16. If you look at the release notes, you would find it by the name ‘Global Picklists”. It is also referred to as… Read More

Salesforce Global Picklists

Adding CPQ and Billing Functionality to Salesforce by acquiring SteelBrick

On December 23 2015, just before the holidays, Salesforce and SteelBrick announced an agreement for Salesforce to acquire Steelbrick for $360 million. Salesforce has a long history of acquiring companies that extend and complement Salesforce functionality and this is in the mid range of the scale, with ExactTarget ($2.5 billion in 2013) and Buddy Media ($745 million in 2012) at the high end and comparable with the more recent purchase… Read More

Adding CPQ and Billing Functionality to Salesforce by acquiring SteelBrick

Winter 16 Enhancements for Process Builder

Process Builder was one of the most awaited features released by Salesforce as an upgrade to the possibilties of the Workflow functionality and as part of its effort to strengthen what can be done declaratively. In Winter 16 Salesforce continues to add further enhancements to the Process Builder. Schedule Multiple Actions Prior to the Winter ’16 release, it was only possible to define 1 scheduled action per criteria node or… Read More

Winter 16 Enhancements for Process Builder

Salesforce List Buttons Javascript Example

List buttons can be used on list pages, search results and any related list for an object. They allow us to take actions on a group of selected records. In this article we are going to show some examples of how Javascript can be used to work with one or more records in a list view or related list. These are examples for Salesforce Classic, if you want to know… Read More

Salesforce List Buttons Javascript Example

Routing work with Salesforce Omni Channel

In the Winter 16 release, Salesforce has introduced a new feature – the Omni-Channel, which is based on a principle of getting work to the right person at the right time. It helps put rules in place to allow the system to determine the importance of work items, and pass it on the right person who is available.  Salesforce Omni Channel is built on 4 Functional Blocks: Image Courtesy: Salesforce… Read More

Routing work with Salesforce Omni Channel

Focus on Automation: Visual Workflow Loops

Loops in Visual Workflow Visual Workflow enables many possibilities to automate processes and reduce or eliminate the need for Apex code. One of the key features of Visual Workflow is the ability to process multiple records using a loop construct, unlike standard workflow, where actions such as a field update operate on only one record. Although Process Builder can operate on multiple records to update related records; once the logic… Read More

Focus on Automation: Visual Workflow Loops

Salesforce Manager Group Sharing Example

Manager Group sharing is a little tricky to understand until you see example scenarios. Here we go through a couple of examples to explain how it works. Understanding the Need for Manager Sharing Groups It is a common practice to group users sharing the same business duties under a single Role. For instance, if your organization has 15 territories within a country – and each territory has an Area Sales… Read More

Salesforce Manager Group Sharing Example