ExamGecko
Question list
Search
Search

Question 12 - Certified Process Automation discussion

Report
Export

What should you avoid inside a loop?

A.
Assigning new values to variables.
Answers
A.
Assigning new values to variables.
B.
Displaying data to the user.
Answers
B.
Displaying data to the user.
C.
Executing actions, such as creating or updating records.
Answers
C.
Executing actions, such as creating or updating records.
D.
Nesting another loop.
Answers
D.
Nesting another loop.
Suggested answer: C

Explanation:

Inside a loop in a Salesforce flow, it's recommended to avoid executing actions such as creating or updating records directly. This can lead to hitting governor limits due to the potentially high number of operations being performed in a single transaction. Instead, it's better to collect the changes in a collection variable and perform bulk DML operations outside the loop.

Reference: Salesforce Developer Blog - Best Practices for Designing Efficient Flows

asked 23/09/2024
Arturs Grigorjevs
42 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first