ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 20 - Certified Hyperautomation Specialist discussion

Report
Export

A Salesforce administrator asks for advice on how to build their Salesforce flow. They need to complete several DML actions as part of their Salesforce flow and are running into DML governor limits during testing.

Which two pieces of advice should be given to the Salesforce administrator to improve their flow? (Choose two.)

A.
Avoid putting DML statements inside of For Loop occurrences.
Answers
A.
Avoid putting DML statements inside of For Loop occurrences.
B.
Use the upsert action to reduce the amount of DML statements required during the flow runtime.
Answers
B.
Use the upsert action to reduce the amount of DML statements required during the flow runtime.
C.
Loopthrough a collection variable to save more records with a single DML statement.
Answers
C.
Loopthrough a collection variable to save more records with a single DML statement.
D.
Use DML statements at the end of the flow wherever possible.
Answers
D.
Use DML statements at the end of the flow wherever possible.
Suggested answer: A, C

Explanation:

Avoid DML in For Loops: Placing DML (Data Manipulation Language) operations inside a loop can quickly exceed Salesforce governor limits, as each iteration performs a separate DML operation. It's best to collect records in a list and perform DML operations outside the loop.

Use Collection Variables: By looping through a collection variable and adding records to it, you can perform bulk DML operations, which are more efficient and less likely to hit governor limits.

Use Upsert Action: Using the upsert action can reduce the number of DML statements by combining insert and update operations. However, this strategy depends on the specific flow requirements and data structure.

DML Statements at the End: Consolidating DML operations to the end of the flow is advisable, but care should be taken to handle errors and exceptions appropriately.

asked 23/09/2024
BETTE SLETTER
35 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first