Smarter Text in Flows

Standard

As Salesforce admins, I hope you have figured out that Flows can make your system super smart. I think this is a smart little hack to flows that can help make them even smarter!

Hopefully not this smart

Here is the setup. You have a flow and in this flow there is some data that is stored in variables. Because this data wants to go forth and adventure, you might use a text template to put some, well, text around those variables so that it makes sense. The text template would then be used in an email alert (just for example).

The thing is, as we all know, the minute you get the text of ANYTHING dialed in, someone asks for it to change. So, into the flow you go, modify the text template, save a new version, etc, etc, etc.

But, what if there was a better way? That question was rhetorical, since there totally is a better way.

For this blog example, I am just going to have a two screens, one as a starting point and a final screen that will substitute for the above mentioned email alert.

flow overview

No clever caption for this

Notice, there is NO text templates in this flow.

Look - No Text Templates

But, the end screen has all this text? WHAAAT?

Final Product

And, just to prove I am not pulling a fast one, here is what that field looks like…it is just variables.

and just to prove...

Instead of using a text template, I am using a text field on an object. The trick here is that you have to enter the variable technical names (Curly brackets, exclamation points) into the text field. This text field is then pulled in the flow via the record look up and will accept the values from the variables.

Really, this is acting JUST LIKE A TEXT TEMPLATE, but with the advantage being that if you want to modify the verbiage you don’t have to go through the modify / save as / activate cycle.

But, we can make this EVEN BETTER! Obviously, having to enter the technical variable name limits how many people can actually use this. But, by adding a bunch of code…LOL, just kidding. We are going to build out a formula field instead. You have to do some gymnastics to get the formatting to work, but once you have it built out, you now have a formula that will show up on the actual records itself and used just like the text field above.

formula           formula on screen

And, the end result is the same!

automagical results

 

so, what do you all think? useful? not? any suggestions? I even take requests if there is a weird question (about salesforce) you might have.

 

Advertisements

Why Process builder, Why? (Humble Pie Update!)

Standard

*** Guess what? This blog post is OUT OF DATE – See this new one for the updated, humble pie, “it’s not salesforce, it’s me” edition! ****

Loads of fun today. I used the process builder to set up some really cool stuff that otherwise would have required a pretty big flow or some apex.

Basically, when a case of a certain type is created, X amount of tasks will be created as well. All was right with the world, created, activated and tested…and then…the world stopped spinning.

Workflow Action Failed to Trigger Flow
The record couldn’t be saved because it failed to trigger a flow.
A flow trigger failed to execute the flow with version ID blah blah blah.
Contact your administrator for help.Click to return to the previous page.

Huh, that is weird…maybe the email message would shed some light on this.

No help here

Move along, no help here

Sigh…Good thing I have a GIF of Batman doing a facepalm!

Batman-Facepalm

After a couple cycles of “deactivate, modify, activate, test”, and more fails with that uber helpful message, I dug into google.

There, on page 9 of the Process Builder Guide, I found the ONE dang line that helped:

“• You can add up to 10 immediate actions and 10 scheduled actions to a given criteria node.”

So, that was the root of this #whysfdcadminsdrink moment…but you know what? That is kind of crazy. I was able to save and activate a process that WOULD NOT WORK AT ALL! You would think that there would be some kind of warning or something, but if you did think that YOU WOULD BE WRONG!

So please, fellow admins, join me in voting up this idea, where process builder would actually not let you save it with a condition that would cause it to fail.

https://success.salesforce.com/ideaView?id=08730000000DlNoAAK