The Drawbacks of Process Builder and Visual Workflow + Some Workarounds

May 1, 2016 Appirio

Process Builder is an advanced workflow tool, which can be seen as workflow rules plus more actions, more flexibility to operate across objects, and the ability to combine multiple rules into a single process.

What is Visual Workflow/flow?

Flows are visual representations of a series of events. They can contain multiple decisions (if/then), branching, and looping logic.

We can do more than create tasks, update fields, and send emails; we can also create, update, and delete multiple records, and embed a flow within a flow.

A few drawbacks of Process Builder

  • Email alerts: Email alerts aren’t supported for the task- or event-based processes.
  • Scheduled actions date: Scheduled actions can be triggered based on any date field, but only by the object involved in the process. For example, if you’re building the process on the opportunity object, then you cannot use its parent account’s date field to trigger the scheduled action — only the opportunity’s date fields are accessible there.
  • Version activation: Once you activate a process, you will need to clone and create another version of that process in order to make any new modifications to it, then activate the process again. To delete a process, each of its versions needs to be deleted manually.
  • Action dependency: If any of the actions fail, the entire transaction fails and an error message displays. For example, an action for a post to Chatter will fail if the Chatter group that it tries to post to is private.
  • Record creation: Only a single record can be created using a process’s record creation action.
  • Child owner update: You cannot update the owner ID field on child records in a process.
  • New record ID: Newly created record IDs (created in a process) cannot be used in another action in the same process.
  • Validation rules: Because updates to records based on processes don’t trigger validation rules, processes can invalidate previously valid fields.
  • Profile access: The profile name of the “Last Modified By” user cannot be accessed in a process.
  • Execution context: Processes always get executed in system context only, unlike visual workflows.

Frequent problems working on flows and how to work around them

  • Picklists: Picklist fields cannot be directly referenced in formula variables in a flow.
  • Possible workaround: Use the “Assignment” element of the flow to assign their values to a flow variable. Then this flow variable can be used in the formula variable.
  • Finish location: For a user input flow, we cannot redirect a flow’s finish page to multiple finish locations based on a certain condition directly in the flow.
  • Possible workaround: Use a VF page and a controller class and define the new finish location of the flow in the controller, based on a condition or based on a flow variable. Or, if you’re calling the user input flow from a JS button, then you can use the retURL parameter to define the conditional finish locations of the flow.
  • Dynamic record choice: You can’t show multiple fields for a record in a dynamic choice element in a flow; only one field can be displayed there. A dynamic choice element is used to query all contacts for an account from which the user is required to select an existing contact. This dynamic choice element allows us to show only one contact field for the displayed contact records.
  • Possible workaround: The only way to work around this issue is to create a formula field on the object in question (contact object here) to hold the concatenated values of the fields to be displayed to the user. And then we can use this formula field as the choice label of the dynamic choice element to be displayed to the user, and the record ID as the choice stored value.


  • DateTime field updates: You can’t directly select a value for a DateTime field in a flow, as any DateTime value the user selects gets converted into GMT and not into the user’s timezone.
  • Possible workaround: Define an invocable method in a global class to take a DateTime value as an input, and return the converted DateTime value as per the current user’s timezone. Now this invocable method can be used in the flow as a global action.


  • Current user details: Currently working user IDs or its other details cannot be fetched from inside a flow/process unless the flow is called from a custom link/button/action and the user ID is passed accordingly.
  • Possible Workaround: Make a hidden formula field on the object for which the process is being made, and use the global variable {!$User.ID} to get the currently working user’s ID. Now this formula field can be used in a process or passed to a flow. Also, if the flow is getting called from a JS custom button, then you can pass the same global variable as a parameter to the flow.
  • Context execution: A visual flow always runs in user context, not in the system context.
  • Possible workaround: To run flows in the system context, we need to call them from the apex of the type “without sharing,” or from a process, as these both can run in the system context.


Previous Article
New in the Spring ‘16 Salesforce Release: Global Picklists
New in the Spring ‘16 Salesforce Release: Global Picklists

By Arpita Bose The ability to create a picklist that can be shared across objects and restrict the picklist...

Next Article
Quality and QA Closure — What, When, and How?
Quality and QA Closure — What, When, and How?

By Madhumita Sharma Why the obsession with quality? The increasing complexity of today’s software products ...