Salesforce PDII Exam (page: 7)
Salesforce Certified Platform Developer II
Updated on: 25-Dec-2025

Viewing Page 7 of 86

What are three benefits of using declarative customizations over code? (Choose three.)

  1. Declarative customizations cannot generate run time errors.
  2. Declarative customizations will automatically update with each Salesforce release.
  3. Declarative customizations do not require user testing.
  4. Declarative customizations are not subject to governor limits.
  5. Declarative customizations generally require less maintenance.

Answer(s): B,D,E



Which use case can only be performed by using asynchronous Apex?

  1. Scheduling a batch process to complete in the future
  2. Processing high volumes of records
  3. Updating a record after the completion of an insert
  4. Calling a web service from an Apex trigger

Answer(s): D



@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



Viewing Page 7 of 86



Share your comments for Salesforce PDII exam with other users:

Farooqi 11/21/2023 1:37:00 AM

good for practice.
INDIA