Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

...

  • You can’t Debug Record triggered Flows!!!! Why, oh why is this not a thing??? Surely it can be done?

    • Make sure when you are debugging that you have turned off ALL other Flows, Process Builders, Workflows etc that may cause things to not work right.

    • In Spring ‘21 there is now a debug link from the email alert on failed Flows… it’s good. But debugging directly would be better.

Tip

Add an Assignment element named Error as the last element in the flow. Make an error happen in this Assignment item (eg set RecordID to a blank value) and turn on the Debug Log. This saved me big time!

...

  • Before-Save Flows don’t trigger on Deletion (I had not gotten to the point of considering this yet, but one commenter raised this as an issue). After-Save Flows do though.

  • When setting defaults in Before-Save Flows don’t do what I did and overwrite what users have already entered. Ensure you do something like:

Code Block
IF(ISBLANK(TEXT({!$Record.YourField__c})),"Default Value,TEXT({!$Record.YourField__c}))

Good Things

  • You can now set defaults for record Owners and Currency ISO Codes??? Maybe? (I need to check this). You can’t set these in Quick Actions (But you may be able to set these through the new URL Hacks also).

  • You can use Before-Save Flows to set values for Duplicate Rules - such a good use of these Before-Save Flows!

  • You CAN use Formulas in record triggered flows, just be aware of the Gotchas! See Formulas in Flow Triggers

  • The new thing of being able to see Flows (and Process Builder) in Time-Based Workflow is a complete game-changer. No need to use Workflow for Time dependant actions anymore. Though why it took this long for Process Builder to be in there, I will never understand.

...

  • You CAN NOT use formulas that include values from any other field set by the Before-Save record. Think of the field as being null always and every time you edit the record this field value is going to be set again. Note, I need to check this now that I’ve worked out you CAN use formulas in Before-Save flows. Oh wow, it looks like it works!!! I will report back when I delve into it further.

Info

In my scenario above. I enter the Base Rate - it is never set in my Assignments in my Flow. I always set my Contract Fee based on the Percentage and the Base Rate.

But what if I have another formula that I want to calculate Contract Total that is added as the Base Rate plus the Contract Fee.

If the formula for fContractFee is $Record.BaseRate__c * $Record.Percentage__c

The formula for fContractTotal can not be fContractFee + $Record.BaseRate__c

It would have to be ($Record.BaseRate__c * $Record.Percentage__c) + $Record.BaseRate__c

(I’ve excluded all the null checks for clarity).

Then I have another formula that spells out the Contract Total in words to display on the Contract documents. So I would have to put the full formula calculation for every part of the formula that requires any part of the value. (For example see all these stupid formulas just for adding the dollar signs). Nope.

That’s all fine for simple formulas but for complex formulas that is a need to go into After-Save Flows.

...