Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Before-Save Flow Triggers are a quite different way of thinking than Process Builders which run in the After Save context. You will use far-fewer IsChanged scenarios, you will use Formulas more.

I’m trying to make rules for my scenarios so here’s an attempt

ALWAYS Set the Value

  • Before-Create

  • Before-Update

Example - Manager Name

  • For when the value ALWAYS has to be the latest updated value

    • Eg if the Manager Name changes, the next time the record is updated it will display the correct Manager Name

  • Also handles if the Manager is not set

  • Formula fManagerName

  • Assign to Manager Name field

IF(NOT(ISBLANK({!$Record.Manager__c})),{!$Record.Manager__r.FirstName} & " " & {!$Record.Manager__r.LastName} ,"")

Issues

  • Will this set if the Manager is set by Default?

Example - ID

  • For when there is an ID on a related record and it needs to be on this record.

    • This is due to maxing out my spanning limits so I can’t do formulas.

  • Checks if the Schedule lookup field has been set

  • Formula fScheduleID

  • Assign to ScheduleID field

IF(NOT(ISBLANK({!$Record.Schedule__c})),
{!$Record.Schedule__r.ID__c},null)

Set Default Value

  • Before-Create

  • Before-Update

  • If the user already enters the value you need to keep that

    • Otherwise set the default based on the related record.

  • Formula fManager

  • Assign to Manager field

IF(NOT(ISBLANK({!$Record.Manager__c})),{!$Record.Manager__c},{!$Record.Account__r.Manager__c})

Do Not Change if Active

Before-Create (if a record can be created as Active)

Before-Update

Formula fClient

Assign to Client Field

IF(ISPICKVAL({!$Record.Status__c},"Draft"),{!Record.Account__r.Client__c},{!$Record.Client__c})

  • No labels