How to use the Wait element

Lets go over one of my least used elements!  The Wait!  The real reason that I never use this, is because there is never really a great need for it on many of my projects.  It is important to note that a Wait element can only be used in Autolaunched Flows (a Flow with NO screens or dynamic choice elements).  To me a Wait element is simply a Time-Dependent Workflow Action snapped into a Flow.  You are able to setup different Event criteria and send the record to different elements based on the Event that it meets.  This works very similarly to how the Decision element work. Continue reading

How to use a Loop

The Loop element gives you the ability to choose the SObject Collection we want to pass through a series of elements.  You have the ability to choose how you loop the collection of records, either in Ascending or Descending order.  Also, you get to select a SObject Variable to be referenced in your Loop.  This is referred to as a Loop Variable.  

It is important to note that the Loop Variable  and the Collection referenced in your Loop must have the same object type.  You can’t have your Collection containing Account records and a Loop Variable being of the type Contact.

One last warning!  If you plan on doing a Record Create/Lookup/Update in a Loop, be careful – you could potentially hit some limits if you have too many records in your Loop!! Continue reading

How to use an Assignment

The Assignment element is a simple yet confusing element.  To be honest, this is one that always tripped me up.  The easiest way for me to remember what an Assignment is, is to compare it to a Field Update.  They have nearly the exact same functionality.  Assignments are extremely valuable when you are doing any sort of calculations on a variable in your Flow.  If you are using this with a Visual Flow then you could have a variable change based on the User’s selections in the Flow. You could also use this similarly to a Field Update based on different decisions and set the variable to a certain value.  Also, you could have a query of records add to a variable their Amounts.  Often people overlook that this can be used on non-numeric fields like checkboxes, picklists, and text fields.  Knowing that can allow you to really customize your Flow to be very dynamic.

Continue reading

How to use a Decision element

Lets go over one of my favorite elements!  The Decision!  This element really lets you make any Flow go to the next level.  By truly understanding and mastering the Decision element, you can really open up a world of possibilities!  I assume that most of you have had some experience writing formulas in both Salesforce and Excel.  The Decision element is simply a big IF statement for your Flow!  As of Spring 15, you can now even add in Advanced Logic to your Decision!!  This was a much needed improvement that will only make using the Decision element even easier to use.

Continue reading

Roll-Up Summary for Account Fields (Part 2)

Part 2 to: Roll-Up Summary for Account Fields (Part 1)

Flow #2 Breakdown

We are going to create a Flow that will find if the parent account.  If the Account has a ParentId, we want to then query all of the accounts under that Parent and summarize the Amount of Chicken sold for each child.  After we summarize that data, we will then update the Parent Account with the new value.  This will allow us to update all levels of a hierarchy on an Account with one simple Flow, because this Flow will keep being triggered until it reaches the Parent Account. Continue reading

Roll-Up Summary for Account Fields (Part 1)

You are hit with some tough demands from someone inside your organization. They want to be able to click on an Account and see the dollar amount of widgets their clients have sold, and be able to see that value on each level of the hierarchy.  Well, this throws Roll-Up Summary fields out the window!  Unfortunately they do not want to use a report to do this, so we need to create an Autolaunched Flow to calculate this for them. Continue reading

Last “Key” Activity Date

Have you noticed that Salesforce’s Last Activity Date is not very useful?  It could have been triggered by a number of activities, but not always the ones that matter.  Think of this Flow as a blueprint for any type of activity you would like to track.

Imagine a stakeholder asks you, “Can I have a Last Activity Date for only completed Demos on an Account?  We want to be able to easily report and track the Accounts we are Demoing on.”  Lets assume for the purpose of this example that every Demo preformed is as a Task on an Opportunity.  Every time a someone completes a Demo, they must select what type of Demo was preformed via the Custom Picklist Field Demo Type. Continue reading