Which approach should a developer take to automatically add a “Maintenance Plan” to each Opportunity that includes an “Annual Subscription” when an opportunity is closed?
Build a OpportunityLineItem trigger that adds a PriceBookEntry record.
Build an OpportunityLineItem trigger to add an OpportunityLineItem record.
Build an Opportunity trigger that adds a PriceBookEntry record.
Build an Opportunity trigger that adds an OpportunityLineItem record.
Correct answer: D
Question 2
Which two statements are true about using the @testSetup annotation in an Apex test class? (Choose two.)
The @testSetup annotation cannot be used when the @isTest(SeeAllData=True) annotation is used.
Test data is inserted once for all test methods in a class.
Records created in the @testSetup method cannot be updates in individual test methods.
The @testSetup method is automatically executed before each test method in the test class is executed.
Correct answer: D
Question 3
What is the requirement for a class to be used as a custom Visualforce controller?
Any top-level Apex class that has a constructor that returns a PageReference
Any top-level Apex class that extends a PageReference
Any top-level Apex class that has a default, no-argument constructor
Any top-level Apex class that implements the controller interface