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

Page 28 of 90

A custom field Exec_Count_c of type Number is created on an Account object. An account record with value of "1" for a: Exec_Count_c is saved. A workflow field update is defined on the Exec_Count_c field, to increment its value every time an account record is created or updated. The following trigger is defined on the account:

trigger ExecOrderTrigger on Account (before insert, before update, after insert, after update){ for (Account accountInstance: Trigger.New){ if (Trigger . isBefore){ accountInstance Exec_Count_c += 1; } System. debug (accountInstance.Exec_Count_c); } }

  1. 1, 2, 3, 3
  2. 1, 2, 3, 4
  3. 2, 2, 4, 4
  4. 2, 2, 3, 3

Answer(s): C



A developer is building a Visualforce page that interacts with external services.
Which interface should the developer implement to test this functionality? (Choose two.)

  1. HTTPCalloutMock
  2. HTTPRequestMock
  3. HTTPResponseMock
  4. StaticResourceCalloutMock

Answer(s): A,D



A developer needs to create a Lightning page for entering Order Information. An error message should be displayed if the zip code entered as part of the Order's shipping address is not numeric.

What is a recommended way for the error message be displayed to the end user?

  1. Use the apex:message tag to display errors
  2. Use the aura:component tag to display errors
  3. Use the ui:outputText tag to display errors
  4. Use the ui:inputDefaultError tag to display errors

Answer(s): D



A developer is writing unit tests for the following method:

public static Boolean isFreezing(String celsiusTemp){ if(String.isNotBlank (celsiusTemp) && celsiusTemp.isNumeric()){ return Decimal.valueof(celsiusTemp) <= 0; } return null; }

Which assertion would be used in a negative test case?

  1. System.assertEquals(true, isFreezing(null))
  2. System.assertEquals (true, isFreezing('0')
  3. System.assertEquals(null, isFreezing('asdf'))
  4. System.assertEquals(true, isFreezing('IOO'))

Answer(s): C



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