Process Automation and Logic
Apex programming, declarative automation, SOQL/SOSL/DML, governor limits, triggers, and the save order of execution.
Process Automation and Logic is a critical domain in the Salesforce Certified Platform Developer I exam, covering approximately 36% of the total exam weight. This area focuses on how developers can automate business processes and implement custom logic within the Salesforce platform. **Apex Progra…
PD1 - Process Automation and Logic Example Questions
Test your knowledge of Process Automation and Logic
Question 1
A developer needs to write a method that accepts a List<String> of product names and returns how many unique product names exist in the list. The method should use the fewest lines of code possible. Which approach accomplishes this?
Question 2
In Apex, which keyword is used in a traditional for loop to move to the next iteration of the loop, skipping the remaining code in the current iteration?
Question 3
A developer writes a before update trigger on the Account object. Inside the trigger, they loop through Trigger.new and check if a field called Status__c has changed. They use the following condition: if (acc.Status__c != Trigger.oldMap.get(acc.Id).Status__c). The trigger compiles and runs successfully. A junior developer asks: what type of collection is Trigger.oldMap?