Free Certified Platform Developer II Exam Braindumps (page: 24)

Page 24 of 90

A developer receives a LimitException: Too many query rows: 50001 error when running code.
What debugging approach using the Developer Console provides the fastest and most accurate mechanism to identify a specific component that may be returning an unexpected number of rows?

  1. Count the number of Row Limit warning messages in the Debug Logs
  2. Add System.debug(System.getQueryRows()) to the code to track SOQL usage
  3. Filter the Debug Log on SOQL_EXECUTE_END statements to track the results of each SOQL Query
  4. Use the Execution Overview to see the number of rows returned by each Executed Unit

Answer(s): C



A developer is writing a Visualforce page to display a list of all of the checkbox fields found on a custom object.
What is the recommended mechanism the developer should use to accomplish this?

  1. Schema Class
  2. Apex API
  3. Schema Builder
  4. Metadata API

Answer(s): A



A developer has created a Team Member sObject that has a Master-Detail relationship to a Project sObject and a Lookup relationship to the User sObject. The developer must ensure that a User listed on a Team Member record has Read-Write access to the parent Project record.

How can the developer accomplish this if the Project sObject has a Private sharing model and thousands of Project records?

  1. Create a Controller that uses the Without Sharing keyword
  2. Create a Criteria-Based Sharing Rule on the Project sObject
  3. Create a Team Member Trigger that inserts Project_Share records
  4. Create a Project Sharing Rule that shares to the Team Member Group

Answer(s): C



1 Contact con = new Contact( LastName ='Smith', Department = 'Admin')
2 insert con;
3 Contact insertedContact=[select Name from Contact where id=:con.Id];
4 Savepoint sp_admin = Database.setSavepoint();
5 con.Department = 'HR';
6 update con;
7 Database.rollback(sp_admin);
8 System.debug(Limits.getDmlStatements());

Given the following code, what value will be output in the logs by line #8?

  1. 5
  2. 3
  3. 4
  4. 2

Answer(s): C



Page 24 of 90



Post your Comments and Discuss Salesforce Certified Platform Developer II exam with other Community members:

Jenil Gandhi commented on November 14, 2024
Hi everyone could sone share the certification voucher for PD2.
INDIA
upvote

Aniq commented on December 02, 2023
Hi every one Could some share the certification voucher for PD2
Anonymous
upvote

Rasheed commented on June 07, 2023
Worth the price. I got 50% off when I selected 2 exams.
PAKISTAN
upvote

Lisha commented on September 21, 2022
Thank you!
Anonymous
upvote