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

Page 45 of 90

Which of the following about Dynamic Apex is incorrect?

  1. You can retrieve the sObject type from an Id by calling .getSObjectType()
  2. getDescribe() can get you a variety of info on a particular object/field
  3. Schema.getGlobalDescribe() gives you a map of all sObject
  4. In dynamic SOQL, you can use bind variables and bind variable fields

Answer(s): D

Explanation:

While you can use simple bind variables in dynamic SOQL, you cannot use bind variable fields (e.g. :myVariable.field1_c)
Use escapeSingleQuotes to prevent SOQL injection



Which of the following exceptions cannot be caught and will force an error? (Choose three.)

  1. LimitException
  2. AssertException
  3. SObjectExceptions
  4. DMLException
  5. License exceptions
  6. ListException

Answer(s): A,B,E

Explanation:

SObjectException occurs when accessing a field not queried, or you try to change a field during the wrong dml statement (i.e. an edit-only field being set on insert)
Custom exceptions must extend the "Exception" class



What is the best way to display field-level error messages in Lightning?

  1. ui:inputDefaultError
  2. ui:outputText
  3. aura:component
  4. apex:message

Answer(s): A



What is the transaction limit for SOQL queries?

  1. 20 (synchronous), 200 (async)
  2. 150 (synchronous), 20 (async)
  3. 150 (synchronous), 200 (async)
  4. 100 (synchronous), 200 (async)
  5. 200 (synchronous), 100 (async)

Answer(s): D



Page 45 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