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 ....
What are three valid Apex loop structures for iterating through items in the collection?
Given: Map<ID, Account> accountMap = new Map>ID, Account> ([SELECT Id, Name FROM Account]); What are three valid Apex loop structures for iterating through items in the collection? (Choose three.)A . for (ID accountID : accountMap.keySet()) {…}B . for (Account accountRecord : accountMap.values()) {…}C . for (Integer i=0; I < accountMap.size();...
Which scenario is invalid for execution by unit tests?
Which scenario is invalid for execution by unit tests?A . Executing methods for negative test scenariosB . Loading the standard Pricebook ID using a system methodC . Loading test data in place of user input for Flows.D . Executing methods as different users.View AnswerAnswer: C
Which two ways should a developer create this functionality?
A developer is asked to create a PDF quote document formatted using the company’s branding guidelines, and automatically save it to the Opportunity record. Which two ways should a developer create this functionality? (Choose two.)A . Install an application from the AppExchange to generate documents.B . Create a Visualforce page...
Which step should the developer take to resolve the issue and properly test the exception?
A developer wrote a unit test to confirm that a custom exception works properly in a custom controller, but the test failed due to an exception being thrown. Which step should the developer take to resolve the issue and properly test the exception?A . Use try/catch within the unit test...
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...
How should the developer design the Apex classes?
A developer created a Lightning component to display a short text summary for an object and wants to use it with multiple Apex classes. How should the developer design the Apex classes?A . Have each class define method getObject() that returns the sObject that is controlled by the Apex class.B...
Which two Apex data types can be used to reference a Salesforce record ID dynamically? (Choose two.)
Which two Apex data types can be used to reference a Salesforce record ID dynamically? (Choose two.)A . ENUMB . sObjectC . External IDD . StringView AnswerAnswer: A,D
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
Where can a developer identify the time taken by each process in a transaction using Developer Console log inspector?
Where can a developer identify the time taken by each process in a transaction using Developer Console log inspector?A . Performance Tree tab under Stack Tree panelB . Execution Tree tab under Stack Tree panelC . Timeline tab under Execution Overview panelD . Save Order tab under Execution Overview panelView...