FLOWS
BEST
PRACTISES
DO NOT
To optimize your flow, refrain from performing DML and get operations
within a loop.
Decision-making
Don't forget to check availability before updating or deleting records. If the
record doesn't exist, it can disrupt the entire flow.
No record available
An unhandled fault has
occurred in this flow
FAULT PATH
A fault path is a mechanism in Salesforce Flow that
allows you to handle errors and exceptions that
may occur during the flow execution. By defining a
fault path, you can specify the actions that should
be taken when an error is encountered, such as
displaying an error message, logging the error, or
redirecting the user to another screen.
They provide a better user experience by
displaying meaningful error messages
They help maintain data integrity by
preventing incomplete or incorrect actions
Subflows are a great way to reuse
01 flow functionality without having to
create the same or very similar
flows more than once across your
Salesforce Org
Implementing automation
02 not only saves time during
Uses of the creation process but
also simplifies its
Subflow
management in the future.
To create an organized and
03 polished appearance, keep
your main flow concise and
visually uncluttered.
04 Auto launched flow operates in the backend
and can be accessed through Apex, Rest API,
Subflow, and other similar methods.
Sub Flow 1
Sub Flow 2
Main Flow
Why are there limitations?
Salesforce is a multitenant environment, which means that multiple
orgs share the resources of the same instance. To make sure no one
occupies too much capacity, Salesforce has enforced these
limitations to govern the usage for each client.
VERSIONS PER FLOW 50
EXECUTED ELEMENTS AT RUNTIME PER FLOW
PER-TRANSACTION FLOW LIMITS
How to Calculate Executed Elements
Executed elements at runtime per flow
For each flow interview, you can only have a maximum of 2,000
elements being executed.
Note: In API version 57.0, the limit of 2,000 flow
elements was removed. In API version 56.0 and earlier,
flows could have a maximum of 2,000 flow elements.
Ensure your flows are on the most recent API version
to make use of this.
Per-Transaction Flow Limits
100
Total number of SOQL queries issued
Total number of records retrieved by SOQL
50,000
queries
Total number of DML statements issued 150
Total number of records processed as a result
10,000
of DML statements
Bulkification feature
Bulkification feature of Record-Triggered (RT) and Schedule-Triggered (ST) Flow. Programmers can
design their code so that similar actions are performed together in one batch. For example, one
operation to create 50 records rather than 50 separate operations that each create one record. This
process is called bulkification, and it helps your transaction avoid governor limits
Clarity with Security in Flows
After creating a screen flow within my organization, I activated
Problem 1
and configured it on my home page. However, when I logged in
as a sales manager, I was unable to view the screen flow.
Enabling Option Flow User for Sales Manager User.
Problem 2 If your screen flows is visible to only service manager, then
consider the following:
Go to the flow setup page
Search the particular flow
Click on Edit Access
Enable the required profiles for the specific flow
This should resolve the issue and the flow will be visible only to
the service manager.
Problem 3
Create a screen flow for the Sales Manager and place it on the record detail page of
the Account. The screen should contain a phone number field. When the user clicks
the 'Next' button, it should update the Account object's phone number field and also
update the phone number in child Contacts. The problem here is that the Sales
Manager does not have field-level access to the Phone Number field.
You can work around this issue without changing the field-level access. To do this,
change the flow run mode. By default, flows run in user mode. By changing the
run mode to System Context mode, you can provide record-level access. Now,
the Sales Manager can update the phone number using the flow, but they won't
be able to see the phone number field in the Account object.
Salesforce
Thanks
for your valuable time