Certified Platform Developer II v1.0 (Certified Platform Developer II)

Page:    1 / 17   
Total 258 questions

UC Loans is a small company with a part time Salesforce administrator. UC Loans wants to create a Loan__c record whenever an Opportunity is won.
What is the optimal solution for UC Loans to accomplish this?

  • A. Process Builder
  • B. Quick Action
  • C. Workflow Rule
  • D. Apex Trigger

Answer : A

A developer needs to send Account records to an external system for backup purposes. The process must take a snapshot of Accounts as they are saved and then make a callout to a RESTful web service. The web service can only receive, at most, one record per call.
Which feature should be used to implement these requirements?

  • A. @future
  • B. Queueable
  • C. Process Builder
  • D. Workflow

Answer : C

A developer gets an error saying 'Maximum Trigger Depth Exceeded'.
What is a possible reason to get this error message?

  • A. The SOQL governor limits are being hit.
  • B. A process Builder is running that sends mass emails.
  • C. There are numerous DML operations in the trigger logic.
  • D. A trigger is recursively invoked more than 16 times.

Answer : D

An org has a requirement that an Account must always have one and only one Contact listed as Primary. So selecting one Contact will de-select any others. The client wants a checkbox on the Contact called 'Is Primary' to control this feature. The client also wants to ensure that the last name of every Contact is stored entirely in uppercase characters.
What is the optimal way to implement these requirements?

  • A. Write an after update trigger on Contact for the Is Primary logic and a separate before update trigger on Contact for the last name logic.
  • B. Write a Validation Rule on the Contact for the Is Primary logic and a before update trigger on Contact for the last name logic.
  • C. Write an after update trigger on Account for the Is Primary logic and a before update trigger on Contact for the last name logic.
  • D. Write a single trigger on Contact for both after update and before update and callout to helper classes to handle each set of logic.

Answer : D

A developer is trying to access org data from within a test class.
Which sObject type requires the test class to have the (seeAllData=true) annotation?

  • A. Report
  • B. User
  • C. Profile
  • D. RecordType

Answer : C

The progress of an apex job queued is using the System.enqueueJob method and needs to be monitored.
Which options are valid? (Choose two.)

  • A. Use the Apex Jobs page in setup
  • B. Query the Queueable Apex record
  • C. Query the AsyncApexJob record
  • D. Use the Scheduled Jobs page in setup

Answer : AC

Which are relevant practices while analyzing the timeline of different types of transactions in the execution overview panel? (Choose two.)

  • A. Log lines in the execution log panel can be analyzed for details about specific events
  • B. The performance tree should be use to analyze events further starting from the one that take the least amount of time
  • C. The execution tree can be used with the execution log to filter and get specific information about events
  • D. Multiple short bursts of Apex events should be analyzed since they can add up to a significant amount of time

Answer : AD

A developer is writing a complex application involving triggers, workflow rules, Apex classes, and processes. The developer needs to carefully consider the order of execution when developing the application.
1. Before Triggers
2. After Triggers
3. Post commit logic such as sending email
4. DML committed to the database
5. Workflow rules
6. Roll-up summary calculations
In what order do the following operations execute?

  • A. 1, 2, 5, 6, 4, 3
  • B. 1, 5, 6, 2, 4, 3
  • C. 1, 2, 4, 5, 6, 3
  • D. 1, 6, 5, 2, 4, 3

Answer : A

A developer has been asked to create code that will meet the following requirements:
Receives input of: Map<Id, Project_c), List<Account>
Performs a potentially long-running callout to an outside web service
Provides a way to confirm that the process executed successfully
Which asynchronous feature should be used?

  • A. @future (callout=true)
  • B. Database.AllowCallouts interface
  • C. Schedulable interface
  • D. Queueable interface

Answer : D

A developer wants to retrieve and deploy metadata, perform simple CSV export of query results, and debug Apex REST calls by viewing JSON responses.
Which tool should the developer use?

  • A. Developer Console
  • B. Force.com Migration Tool
  • C. Workbench
  • D. Force.com IDE

Answer : C

What is a best practice when unit testing a controller? (Choose two.)

  • A. Simulate user interaction by leveraging Test.setMock()
  • B. Verify correct references by using getURL()
  • C. Access test data by using seeAllData=true
  • D. Set query parameters by using getParameters().put

Answer : BD

What Visualforce tag can be used to display custom messages in pages using the Salesforce UI styling for errors, warnings, and other types of messages?

  • A. <apex:customMessage>
  • B. <apex:error>
  • C. <apex:message>
  • D. <apex:pageMessage>

Answer : D

A developer is working on code that requires a call to an external web service from a batch.
How should the developer enable this functionality?

  • A. Implement a custom System.CalloutException class
  • B. Include Database.AllowCallout() in the class definition
  • C. Implement an @future method for the callout, and invoke it from the batch
  • D. Specify "callout=true" in the batch implementation

Answer : B

A developer must create a custom pagination solution for accessing approximately 2000 records and displaying 50 records on each page. Data from Salesforce will be accessed via an API and not via Apex.
How can the developer meet these requirements? (Choose two.)

  • A. Use a StandardSetController
  • B. Use CURSOR 50 in SOQL queries
  • C. Use OFFSET in SOQL queries
  • D. Use LIMIT 50 in SOQL queries

Answer : CD

A developer must create a way for external partners to submit millions of leads into Salesforce per day.
How should the developer meet this requirement?

  • A. Publicly expose a Visualforce page via Force.com Sites
  • B. Create a web service on Heroku that uses Heroku Connect
  • C. Host a Web-to-Lead form on the company website
  • D. Publicly expose an Apex Web Service via Force.com Sites

Answer : B

Page:    1 / 17   
Total 258 questions