Free Certified Platform Developer II Exam Braindumps

@isTest static void testIncrement() {
Account acct = new Account(Name = 'Test');
acct.Number_Of_Times_Viewed__c = 0;
insert acct;

AuditUtil.incrementViewed(acct.Id);
Account acctAfter = [SELECT Number_Of_Times_Viewed__c FROM Account WHERE Id = :acct.Id][0]

System.assertEquals(1, acctAfter.Number_Of_Times_Viewed__c);
}

The test method above calls an @future method that increments the Number_of_Times_Viewed c value. The assertion is failing because the Number_of_Times_Viewed c equals 0.

What is the optimal way to fix this?

  1. Change the initialization to acct.Number_Of_Times_Viewed c = 1.
  2. Add Test.startTest() before and Test.stopTest() after AuditUtil.incrementViewed.
  3. Add Test.startTest() before and Test.stopTest() after insert acct.
  4. Change the assertion to System.assertEquals(0, acctAfter.Number_Of_Times_Viewed c).

Answer(s): B



A company represents their customers as Accounts that have an External ID field called
Customer_Number c. They have a custom Order (Order c) object, with a Lookup to Account, to represent Orders that are placed in their external order management system (OMS).
When an order is fulfilled in the OMS, a REST call to Salesforce should be made that creates an Order record in Salesforce and relates it to the proper Account.

What is the optimal way to implement this?

  1. Perform a REST GET on the Account and a REST POST to update the Order c with the Account’s record ID.
  2. Perform a REST PATCH to upsert the Order c and specify the Account’s Customer_Number c in it.
  3. Perform a REST POST to update the Order c and specify the Account’s Customer_Number c in it.
  4. Perform a REST GET on the Account and a REST PATCH to upsert the Order c with the Account’s record I

Answer(s): B



What are three benefits of using static resources in Visualforce and Lightning Components? (Choose three.)

  1. Static resource files are automatically minified.
  2. Static resource files can be referenced by using the $Resource global variable instead of hardcoded IDs.
  3. Static resource files can be packaged into a collection of related files in a zip or jar archive.
  4. Static resource files do not count against an organization’s quota of data storage.
  5. Relative paths can be used in files in static resource archives to refer to other content within the archive.

Answer(s): B,C,E



A company has a native iOS app for placing orders that needs to connect to Salesforce to retrieve consolidated information from many different objects in a JSON format.
Which is the optimal method to implement this in Salesforce?

  1. Apex REST Web Service
  2. Apex SOAP Web Service
  3. Apex SOAP Callout
  4. Apex REST Callout

Answer(s): A






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