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?
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?A . Build a OpportunityLineItem trigger that adds a PriceBookEntry record.B . Build an OpportunityLineItem trigger to add an OpportunityLineItem record.C . Build an Opportunity trigger...
Which code block will run successfully in an execute anonymous window?
A developer has the controller class below. Which code block will run successfully in an execute anonymous window?A . myFooController m = new myFooController();System.assert(m.prop !=null);B . myFooController m = new myFooController();System.assert(m.prop ==0);C . myFooController m = new myFooController();System.assert(m.prop ==null);D . myFooController m = new myFooController();System.assert(m.prop ==1);View AnswerAnswer: C
What should the developer do to deploy to production?
A developer created a Visualforce page and a custom controller with methods to handle different buttons and events that can occur on the page. What should the developer do to deploy to production?A . Create a test class that provides coverage of the Visualforce page.B . Create a test page...
What can the developer do to ensure that the private methods can be accessed by the test class?
A developer creates an Apex class that includes private methods. What can the developer do to ensure that the private methods can be accessed by the test class?A . Add the TestVisible attribute to the Apex classB . Add the SeeAllData attribute to the test methods.C . Add the TestVisible...
Which three options allow a developer to use custom styling in a Visualforce page? (Choose three.)
Which three options allow a developer to use custom styling in a Visualforce page? (Choose three.)A . <apex:stylesheet> tagB . Inline CSSC . <apex:style>tagD . <apex:stylesheets>tagE . A static resourceView AnswerAnswer: A,B,E
What is the result of the debug statements in testMethod3 when you create test data using testSetup in below code?
What is the result of the debug statements in testMethod3 when you create test data using testSetup in below code? A . Account0.Phone=333-8781, Account1.Phone=333-8780B . Account0.Phone=888-1515, Account1.Phone=999-2525C . Account0.Phone=333-8780, Account1.Phone=333-8781D . Account0.Phone=888-1515, Account1.Phone=999-1515View AnswerAnswer: C
What is the result of running this Apex?
An org has a single account named ‘NoContacts’ that has no related contacts. Given the query: List<Account> accounts = [Select ID, (Select ID, Name from Contacts) from Account where Name=‘NoContacts’]; What is the result of running this Apex?A . accounts[0].contacts is invalid Apex.B . accounts[0].contacts is an empty Apex.C ....
How can a developer set up a debug log on a specific user?
How can a developer set up a debug log on a specific user?A . It is not possible to setup debug logs for users other than yourself.B . Ask the user for access to their account credentials, log in as the user and debug the issue.C . Create Apex code...
How should a developer avoid hitting the governor limits in test methods?
How should a developer avoid hitting the governor limits in test methods?A . Use @TestVisible on methods that create records.B . Use Test.loadData() to load data from a static resource.C . Use @IsTest (SeeAllData=true) to use existing data.D . Use Test.startTest() to reset governor limits.View AnswerAnswer: D
Which two options allow the developer to dynamically determine the ID of the required Record Type by its name?
A Platform Developer needs to write an Apex method that will only perform an action if a record is assigned to a specific Record Type. Which two options allow the developer to dynamically determine the ID of the required Record Type by its name? (Choose two.)A . Make an outbound...