SALESFORCE-PD1 · domain
Process Automation And Logic
This domain covers Apex triggers, SOQL/DML governor limits, and asynchronous Apex options like @future, Queueable, Batchable, and Schedulable. Questions present a scenario—such as a trigger updating Contacts—and ask you to predict behavior, pick the right async feature, or identify which limit is exceeded.
Focused practice
Practice Process Automation And Logic questions
Scored sessions drawing only from this domain — pick a length below.
Start 20-question practice test →What this domain covers
What to know about Process Automation And Logic
Be able to write bulk-safe triggers, move logic out of loops, and select the correct async feature: @future for primitives, Queueable for complex SObjects, Batchable for large data volumes. The single most important thing is keeping SOQL and DML outside loops.
Bulk-safe trigger design avoiding SOQL or DML inside loops over Trigger.new
Choosing @future for simple single-method background calls with primitive parameters
Using Queueable Apex to pass complex SObject lists with parent and child records
Recognizing governor limits: SOQL queries, DML statements, and CPU time per transaction
Watch out for
Common Process Automation And Logic exam traps
- ▸Placing SOQL or DML inside a for-loop over Trigger.new, which hits the 100-query or 150-DML limit in bulk tests
- ▸Assuming @future can accept SObject or List parameters; it only supports primitive data types
- ▸Forgetting that trigger recursion or cascading updates can re-fire triggers and multiply DML operations
Question index
All Process Automation And Logic questions (103)
Click any question to see the full explanation, or start a practice session above.
A developer implements a Queueable class that makes an external REST callout. The developer needs to test this class using Test.startTest() and Test.stopTest(). What is required for the callout to succeed in the test method?
Hard2A developer is writing a Batch Apex class to update 50,000 records. Which method must be implemented to define the scope of records to be processed?
Medium3When evaluating whether to use Flow Builder or an Apex trigger for record automation, which scenario best justifies choosing an Apex trigger over a Record-Triggered Flow?
Medium4A developer needs to invoke an asynchronous method from a standard synchronous Apex trigger. The asynchronous method must be annotated with which keyword?
Easy5A developer needs to schedule a class to run nightly at midnight to clean up stale audit records. Which interface must the class implement?
Easy6A developer needs to pass a custom SObject record with related child lists into an asynchronous execution context. Which asynchronous Apex feature supports passing non-primitive types such as custom Apex objects or sObject collections?
Medium7Which of the following describes the behavior of a static variable in Apex?
Hard8In the order of execution, when are custom validation rules evaluated relative to Before Triggers?
Medium9Which TWO best practices should a developer follow when writing bulkified Apex triggers? (Choose TWO.)
Medium10A developer created a Screen Flow that collects a Case's priority and assigns it to the Case record. After saving the flow and embedding it on a Lightning record page, users report that the Case's Priority field is not updating even though the flow completes without errors. What is the most likely cause?
Medium11A developer needs to process 500,000 records daily and update a custom field based on complex business logic. Which asynchronous Apex feature is specifically designed to handle large batch data processing with flexible scope sizes and built-in transaction monitoring?
Medium12A developer needs to execute a lightweight background task that does not require complex chaining or monitoring. Which asynchronous feature is easiest to implement for a single method call?
Medium13Which THREE criteria are best suited for choosing an Apex Trigger over a Flow?
Medium14A developer wants to chain a second asynchronous job from within an executing Queueable Apex job. Which method should be used?
Hard15A developer needs to execute a batch job every Sunday at midnight. Which interface must the scheduling class implement?
Medium16A developer has written a Batch Apex class to process millions of records. During execution, some transactions fail due to temporary external web service timeouts. What is the standard behavior of Batch Apex when an unhandled exception occurs in a batch execution?
Hard17Which governor limit is associated with the total number of SOQL queries issued in a single synchronous transaction?
Easy18A developer is choosing between Future methods and Queueable Apex. Which TWO characteristics are unique to Queueable Apex? (Choose TWO.)
Medium19What is the primary benefit of using Flow Builder over Apex triggers when implementing simple field validations?
Easy20A developer needs to ensure that a custom logging operation runs asynchronously and can be monitored using job IDs. Which interface is best suited?
Medium21Which context variable in an Apex trigger contains the old map of records for update operations?
Easy22A developer needs to write an Apex test class for a trigger that fires on Account insert and creates a related Contact. The test must verify that the Contact is created with the correct LastName. Which assertion should be used after inserting the Account and querying for the Contact?
Medium23A developer has a trigger that updates parent Account records when Child Contacts are modified. To prevent infinite recursion, the developer uses a static boolean variable in a helper class. What is a key limitation of using static variables for recursion control in Salesforce?
Hard24A developer writes a Queueable Apex job that queries 50,000 records, performs calculations, and updates them. During testing, the job hits a heap size limit. What is the standard asynchronous heap size limit in Apex?
Hard25When should a developer choose Flow Builder over an Apex Trigger for business automation?
Easy26An asynchronous method needs to be invoked from a standard trigger to perform callouts to an external web service. Which annotation is required for this asynchronous method?
Easy27When should a developer choose Flow Builder over Apex for implementing business automation logic?
Medium28A developer has a requirement to pass a complex SObject list containing parent and child records into an asynchronous method for further processing. Which asynchronous feature supports passing non-primitive data types such as Lists of SObjects?
Medium29Which TWO triggers are executed during a record merge operation in Salesforce? (Choose two.)
Medium30An Apex trigger needs to prevent deletion of Account records that have related active Contacts. When should this check occur?
Medium31A developer needs to execute lightweight asynchronous logic that is chainable and allows passing complex objects to the background job. Which asynchronous feature should the developer implement?
Easy32What is the maximum number of batch Apex jobs that can be queued or active concurrently in the Apex flex queue?
Hard33During the execution of a trigger, an unhandled exception occurs in an after update trigger. What happens to the database transaction?
Hard34A developer has written a Before Insert trigger on the Contact object that needs to validate user input and potentially prevent the record from saving. Which method on the Trigger context or record instance should the developer use to flag an error?
Medium35What is the primary benefit of using a Flow over an Apex trigger for simple field updates?
Easy36What is a key advantage of using Queueable Apex over future methods?
Easy37A developer needs to execute long-running computations that require complex chaining and the ability to pass non-primitive data types to the job. Which asynchronous feature should the developer implement?
Easy38Which TWO features are characteristic of Flow Builder compared to Apex triggers? (Choose two.)
Easy39Which tool provides a declarative alternative to Apex triggers for creating records when another record is created?
Easy40An architect is designing an automation solution and wants to decide between a Record-Triggered Flow and an Apex Trigger. Which scenario heavily favors choosing an Apex Trigger?
Medium41A developer needs to process 2 million records asynchronously, performing complex calculations and updating parent records in batches of 2,000. Which feature should the developer implement?
Medium42A developer needs to write a Batch Apex class that processes records and ensures atomicity per batch chunk. Which TWO statements are true regarding Database.Batchable execution and error handling? (Choose TWO.)
Hard43A developer is analyzing the Salesforce order of execution for a record update. Which TWO events occur AFTER custom validation rules are evaluated? (Choose TWO.)
Hard44A developer needs to access the old values of a record in an Apex trigger. Which collection provides this?
Hard45A developer writes an Apex trigger that performs a SOQL query inside a standard for-loop processing Trigger.new. Which governor limit is most likely to be exceeded?
Medium46Which method is used in an Apex trigger to display a custom error message on a specific record during a before insert event?
Easy47A developer needs to execute logic before a record is inserted into the Database to validate field values and prevent invalid records from saving. Which trigger event should the developer use?
Easy48A developer needs to schedule an Apex class to run weekly. Which THREE elements are required to implement Schedulable Apex? (Choose THREE.)
Medium49Which TWO actions can be performed inside a before insert Apex trigger without causing a runtime exception? (Choose two.)
Medium50Which feature allows administrators to invoke an Apex method from a Flow?
Easy51During the Salesforce order of execution, when are validation rules evaluated relative to before triggers?
Hard52A developer has written a trigger on the Account object that performs a SOQL query inside a for-loop. The developer notices that when a data load of 200 records occurs, governor limits are exceeded. What is the most efficient way to refactor this trigger?
Medium53A developer needs to write a test class for a Batch Apex job. Which method must be called to verify that the batch job executes correctly?
Medium54Which TWO tools or features should a developer consider when choosing between Flow Builder and Apex for business logic automation? (Choose two.)
Medium55Which THREE actions can cause a governor limit exception during a poorly optimized trigger execution? (Choose three.)
Hard56What is the maximum number of asynchronous batch jobs that can be queued or active concurrently in the Flex Queue?
Easy57A developer needs to update a related record. If using Apex, what is the best practice to avoid hitting governor limits?
Medium58A developer wants to schedule an Apex class to run daily. Which interface must the class implement?
Medium59Which TWO statements are true regarding Queueable Apex compared to future methods? (Choose two.)
Medium60A developer needs to ensure that a validation rule on the Opportunity object fires only when the Stage is 'Closed Won' and the Amount is less than 1000. Which formula should be used in the validation rule's error condition?
Easy61When should a developer choose to implement Schedulable Apex? (Choose two.)
Medium62A developer has a requirement to perform a callout to an external ERP system immediately when an Opportunity reaches Closed Won. The developer decides to use a future method from an after update trigger. What is a primary architectural limitation of this approach?
Hard63Which interface enables an Apex class to be invoked from a Flow using the InvocableAction framework?
Easy64An enterprise application requires real-time integration where outgoing callouts must be triggered from an Apex trigger. What architectural pattern must the developer use?
Medium65A developer is writing a Queueable class that needs to make a callout and also perform a DML operation afterward in the same transaction. Which interface must be added to the Queueable class definition?
Hard66A developer creates an Apex trigger that updates related Contact records whenever an Account record is updated. The trigger performs a DML operation on the Contacts. During testing, updating an Account causes the trigger to fire infinitely and throw a System.LimitException: Maximum trigger depth exceeded. Which design pattern should the developer implement to prevent this recursion?
Hard67A developer needs to ensure that an Apex trigger fires only during the after insert context. Which check should be placed at the beginning of the trigger body?
Medium68Which TWO tools are effective for monitoring asynchronous Apex jobs?
Medium69Which best practice should be followed when writing Apex triggers to ensure bulkification?
Easy70During the Salesforce save order of execution, when are before triggers executed relative to custom validation rules?
Hard71A developer needs to ensure that a specific Apex method runs asynchronously because it makes a callout to an external REST API from a standard user interface controller. Which annotation must be added to the method?
Easy72Which THREE statements are true regarding asynchronous Apex governor limits and execution behavior? (Choose three.)
Hard73A developer has a trigger that updates related child records. To prevent recursive trigger execution when updates ripple through child triggers, what is a standard best practice design pattern?
Hard74A developer is troubleshooting a transaction that exceeds governor limits due to SOQL queries. Which THREE techniques help prevent hitting SOQL query limits in Apex? (Choose THREE.)
Hard75A developer implements a Schedulable class to run a daily cleanup job. What is the maximum number of scheduled Apex jobs that can be simultaneously active in an org?
Hard76When a record-triggered flow performs an action that causes a trigger to fire, which order of execution phase is this?
Hard77Which context variable should a developer use in an Apex trigger to determine if the trigger was fired by an update operation rather than an insert?
Easy78A developer is troubleshooting an Apex trigger recursion issue where an update operation triggers itself infinitely. Which THREE strategies can the developer use to safely prevent this recursion? Choose 3 options.
Hard79A developer encounters a 'System.AsyncException: Maximum queueable jobs added to the queue' error. What caused this exception?
Hard80Which governor limit applies to the total CPU time in a single synchronous Apex transaction?
Easy81A developer is implementing a Batch Apex class to process 500,000 Contact records. Which method defines the starting point and retrieves the records to be processed?
Medium82A developer needs to chain asynchronous jobs. Which interface allows for a single job to be queued from within the execution of another?
Hard83Which trigger context variable should a developer use to access the map of old record versions prior to the update operation?
Easy84When should a developer use a record-triggered flow instead of a scheduled path in a flow?
Easy85When should a developer choose a Record-Triggered Flow over an Apex trigger for automating record updates before save?
Medium86Which trigger event handles the restoration of records from the Recycle Bin?
Easy87A developer needs to abort a scheduled Apex job programmatically from within a test class or maintenance script. Which method should be used?
Hard88Which TWO best practices should developers follow when implementing Queueable Apex chaining? (Choose two.)
Medium89An Apex trigger needs to update fields on the same record that is currently being inserted in a Before Insert trigger context. How should the developer implement this update?
Medium90A developer writes an Apex trigger that performs a DML operation on Account records. The Account has a Roll-Up Summary field calculated from child Contact records. What happens during the order of execution regarding roll-up summary field calculations?
Hard91A batch Apex class processes 50,000 records. During the execute method, a custom governor limit is approached. Which method can the developer call to check the remaining CPU time dynamically?
Hard92A developer is building a solution that requires complex branching logic. When should the developer choose Apex over Flow?
Medium93Which TWO of the following statements about Trigger.new and Trigger.old are accurate?
Medium94Which trigger context variable returns a map of IDs to the new versions of the sObject records?
Easy95Which tool is best for automating a process that requires UI interaction, such as a wizard screen?
Easy96A developer needs to write a unit test for a Queueable Apex class. How should the developer verify that the Queueable job executed successfully?
Medium97A developer is writing an Apex trigger and needs to ensure proper bulkification. Which TWO practices should the developer follow to avoid governor limits? (Choose two.)
Medium98When comparing Flow Builder decision points and Apex trigger logic, which THREE statements are valid design considerations? (Choose THREE.)
Medium99A developer implemented a Queueable Apex class that performs heavy processing. During testing, the developer wants to verify whether the asynchronous job has finished executing before running dependent unit test assertions. What should the developer use?
Medium100A developer needs to run a batch job that queries records and updates them. What is the default batch size if no optional batch size parameter is specified in Database.executeBatch()?
Medium101A developer implements a Queueable class that makes callouts and needs to test it using Test.startTest() and Test.stopTest(). When does the asynchronous queueable job execute during a unit test?
Hard102A developer creates a Trigger on the Account object that performs a SOQL query inside a for loop. While testing with bulk data operations, the developer encounters a governor limit exception. Which limit is most likely exceeded?
Hard103A developer is designing an asynchronous architecture using Batch Apex. Which THREE considerations must be kept in mind regarding Batch Apex behavior? (Choose THREE.)
HardOther domains
All SALESFORCE-PD1 exam domains
Frequently asked questions
- What does the Process Automation And Logic domain cover on the SALESFORCE-PD1 exam?
- Be able to write bulk-safe triggers, move logic out of loops, and select the correct async feature: @future for primitives, Queueable for complex SObjects, Batchable for large data volumes. The single most important thing is keeping SOQL and DML outside loops.
- How many questions are in this domain?
- This page lists all 103 Process Automation And Logic questions in the SALESFORCE-PD1 question bank. The actual exam draws from this domain proportionally to its weighting in the official exam blueprint.
- What is the best way to practise this domain?
- Start with a short focused session (10 questions) to identify gaps, then work through explanations. Repeat with a longer session once the weak areas feel solid.
- Can I practise only Process Automation And Logic questions?
- Yes — the session launcher on this page filters questions to this domain only. Choose any session length for inline explanations and scoring.