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

Page 33 of 90

What is a valid request for the following REST method? (Choose two.)

@HttpPost global static void myPostMethod(String sl, Integer il, Boolean bl, String 52)

  1. <request> <sl>my first string</sl> <11>123</il> <32>my second string</32>
    <b1>false</bl> </request>
  2. <request> <sl>"my first string"</sl> <il>123</il> <sZ>"my second string"</32>
    <bl>false</bl> </request>
  3. sl" : "my first string", 11" : "123", "b1" : "false", "S2" : "my second string"
  4. il" : 123, "S1" : "my first string", "S2" : "my second string", "bl" : false

Answer(s): A,D



A developer wrote a Visualforce page for Sales Reps to add products to an order. The page takes a URL query parameter, productFamily, which filters the product results. The test method for the filter behavior has an assertion failing due to an incorrect number of results.
Why could the test be failing? (Choose two.)

  1. The test does not call Test.startTest()
  2. The test does not create product data
  3. The test is not run by a System Administrator
  4. The test does not set the current page reference

Answer(s): B,D



A developer writes the following code:

public with sharing class OrderController() public PaqeReference sendOrder() Order_c order = new Order_c insert order; ExternalOrder externalOrder = new ExternalOrder(order); Http h = new Http(); HttpRequest req = new HttpRequest(); req.setEndpoint('https://www.example.org/v1/orders'); req.setMethod('POST'); req.setBody(JSON.serialize(externalOrder)); HttpResponse res = h.send(req); order = (ExternalOrder)JSON.deserialize(res.getBody(),ExternalOrder.class);

While testing the code, the developer receives the following error message: System.CalloutException : You have uncommitted work pending
What should the developer do? (Choose two.)

  1. Use the asyncSend() method of the HTTP class to send the request in async context
  2. Ensure all callouts are completed prior to executing DML statements
  3. Move the web service callout into an @future method
  4. Use Database.insert (order, true) to immediately commit any database changes

Answer(s): B,C



What is the most efficient way in Visualforce to show information based on data filters defined by an end-user for a large volume of data?

  1. Use the rendered condition in Visualforce to limit data based on data filters
  2. Use filter conditions in a SOQL query to limit data based on data filters
  3. Use an Apex controller to refine raw data based on data filters and store the result in a transient variable
  4. Use an Apex controller to refine raw data based on data filters and store the result in a static variable

Answer(s): B



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