A Salesforce Administrator is building an autolaunched flow to process a list of Renewal Contracts. To ensure the flow executes efficiently without hitting SOQL or DML governor limits, which TWO design actions should the administrator take?
- Execute a Get Records element prior to entering the Loop element to fetch the required dataset into a record collection variable.Cevap
- Use an Assignment element inside the Loop to add updated record variables to a record collection, then execute an Update Records element after the Loop finishes.Cevap
- CPlace a Get Records element inside the Loop to fetch related account details for each contract record during iteration.
- DAdd an Update Records element inside the Loop so that field updates on each contract are committed to the database immediately upon each iteration.
Cevap
The administrator should execute a Get Records element prior to entering the Loop to fetch records into a collection variable, and use an Assignment element inside the Loop to stage record changes into a collection before performing a single Update Records operation after the Loop finishes.
Bulkification requires moving data access and manipulation elements outside of iteration loops. Fetching records prior to entering the loop gathers the dataset in a single query. Staging updates into a collection variable via an Assignment element and running a single Update Records element after the loop completes ensures all database operations occur in bulk.
Adım Adım Çözüm
Anahtar Kavram
Flow Bulkification Best Practices