Gorav Seth

Salesforce MVP | Permaculture designer

Page 2

Setting flow finish behavior without a custom controller

Until now, in order to redirect the user to a record created in a flow, you needed to embed the flow in a visualforce page, and use a custom apex controller to get the record Id from the flow so you can use pass it to a pagereference method and direct the user to the record.

This meant that you could not use lightning runtime (as flows embedded on visualforce pages will only use classic runtime) and that you needed to write up a custom controller.

No longer! With winter18, you can use the lightning flow component on a visualforce page - and that component automatically has access to flow variables via the outputVariables variable/property. (i have very limited js knowledge so please share the correct terminology).

Start with the sample code on developerforce.

It has a couple of issues and will not work as written, but a fine fellow who goes by Charles T on sfse guided me to a...

Continue reading →

My FormAssembly wish list

I am a big fan of formAssembly, primarily from the angle of a Salesforce administrator of a complex org. I’m maintaining a running list here of issues and functionality that I hope to see added.


  • provide connector level skip logic on all connectors
    • allows for much better management of updates to live forms as can have test-only connectors that are activated by a URL parameter
  • error handling
    • only option is a single global email address.
    • this could be set per form, or better would be to have error connectors so you can really customize what happens


  • provide built-in functionality for discount codes and scholarships
    • using client side js is easily hacked
    • scholarships (100% discount) require are very poorly supported and require a ton of work
  • add a ranking question type (a list of options that can be dragged into order)


  • prefill...

Continue reading →

Use flow in Chatter profile tab to update user fields

I needed a ‘simple’ way for users to view and update two custom fields on their user record. Visual workflow or visualforce are easy enough for this type of stuff but need a custom tab or a link in order to pass in the running user Id to the page / launch the flow.

I like Chatter subtab apps / profile tabs for this use case, as they allow you to group functionality that is relevant to the running user, in a clean way that doesn’t add yet another tab to the mix.

However, when using a visualforce tab in a profile tab, you can easily display running user data using the $User global variable, but you need a controller extension in order to update data because you have no way to pass in the running user’s Id to the page’s standard Id parameter. And i wanted something simple, which for me means no apex code.

So, I did a lot of digging to find a simple way to do this, and found the...

Continue reading →

Manipulating text in flows

i occasionally need to iterate over a list of records in a sObject collection, and display values from the records in a screen.

back in the day i got some crucial help from salesforce yoda / mark ross on this developerforce post, which pointed at the approach.

use a text variable to store the final concatenated text for display.
call it : vaFinalText

use a loop to iterate over your collection. in the loop, use an assignment element with a text template that references the loop variable to add data to the final text variable
call it : ttLoopText

and use a constant, with a value of < br /> to add line breaks between each loop (which i cribbed, probably from this post)

this approach of using the <br /> in a constant works fine in many cases, but not in email, as flow emails are strictly plain text, so the <br /> comes through exactly as entered.


i had seen some solutions for this...

Continue reading →

DCNPUG Summer17 Release Overview

Release Notes : https://releasenotes.docs.salesforce.com/en-us/summer17/release-notes/salesforce_release_notes.htm

Notable Features : Tried to focus on end users in classic, but a bit of dev and lightning only stuff in here too.

Salesforce Optimizer : Summer 17 covers more ground (apex, vf, limits, chatter usage, salesforce 1) than Spring. Optimizer is pretty sweet. If you haven’t tried it out yet give it a shot.

Search for opps using account name

Duplicate Management : lead-contact matching Duplicate management is pretty sweet. Try it out. Note - doesnt play nice with flows (yet).

App to convert attachments to files Files are better. But you probably didnt want to leave the old attachments behind, and now you dont have to.


add to campaign button on custom report types

see which campaigns accounts are responding to lightning only & requires customizable...

Continue reading →

Testing Permission Set Deployment Changes

The Summer17 release made a rather significant change to permission set deployment.


In API 40.0 and later, when you deploy the output of a retrieval to another org, the target org metadata is now replaced by the metadata in the deployment. In API 39.0 and earlier, when you deploy your retrieved permission set output to another org, the deployment contents are merged with your current org data.

So the new permission set blows away the old one. This left me w/ some weedy questions I wanted to test, and this is what I found:

  • Does deploying permission set really overwrite ALL permission in target org (CRED, Tab, Record Type, FLS, System Perms, VF, Apex, etc)

answer : yes for CRED, Record Type, VF, Apex, FLS. I still need to test system perms but there is no trace left of...

Continue reading →

A sad day for the platform

Just this spring, I presented a webinar with FinancialForce on the power of having HR/HCM on the Salesforce platform. Four short months later the dream is dead.


FinancialForce announced today that they will be leaving the HCM space, and are shifting to an approach that relies on integrating ADP with their Professional Services Automation application, while Talent and Skills management (presumably the performance module ++) will be migrated to the PSA application. The HCM application will be shelved in 2022.

This announcement follows the January 2017 appointment of Tod Nielsen as CEO, who is clearly charting a new direction from founder Jeremy Roche.

We were on Vana, which became FinancialForceHCM when it was aquired by Financial force in November 2013. At the time, I was elated by the acquisition, thinking it would infuse the product with the best of class development...

Continue reading →

Consolidating Campaign Members using Open Refine

Over time, campaign members build up, and at some point you may want to delete them to lower storage usage. I will demonstrate an approach to ‘consolidating’ multiple historical campaign member records to a single campaign member record.

So it would go from this:

To this:

Allowing you to retain the information, in a single campaign member record.

Note that this approach requires creating a custom long text area field on campaign member, as the standard description field just displays the lead/contact description field and cant be written to. This post assumes you have a custom field called ‘Notes’ (Notes__c) on the campaign member object.

There are four broad steps in this process

  1. export data from Salesforce
  2. ‘consolidate’ records using OpenRefine
  3. load new campaign records w/ consolidated data in notes field
  4. delete the existing campaign member records (using...

Continue reading →

Visual Workflow Session - DCNPUG - March 2017

This post is the outline for my presentation on visual workflow at the march 2017 dc nonprofit user group meeting

  1. what is flow
  2. the 3 types of flows
  3. when I use flow
  4. what flow is good at
  5. what flow is not good at
  6. when I use flow very carefully if at all
  7. how to learn about flow
  8. when good flows go bad - debugging flows
  9. advanced flow tips / tricks / demo

what is flow

Visual Workflow, built using Force.com’s Cloud Flow Designer, lets you visually string together one or more forms, business rules, and calls to backend APIs to implement a complete business process without writing code.

Visual Workflow is the product name, Cloud Flow Designer is the tool, and flows are the thing that you create.

so really, what is flow

its a really cool tool that leaps past a number of barriers that required code. everything you can do w/ process builder you can do w flow, but many things that you can do...

Continue reading →

A flow to clone a hierarchy of any depth

A user on the hub wanted to clone campaign hierarchies (just the campaigns, not the members). I thought that it just might be possible using visual workflow, but had no idea what i was in for…

I managed to pull it off, and stay reasonably within governor limits by using some well-placed screen elements. Screen elements, after all, start a new transaction, which resets the limits.

I learned a lot working through this challenge, and will try to lay out the key findings in this post.

The basic idea was to approach it one ‘level’ at a time. So start with a parent campaign (A) and clone it (A1) then query all of the campaigns (B) where B.parentID = A.id, and make copies of those under A1. And then go through each child campaign (B) and find campaigns © where c.parentId = b.id, and so on…

I used a subflow to do most of the lifting. The subflow takes two IDs as inputs: the existing...

Continue reading →