Try Before You Buy

Download a free sample of any of our exam questions and answers

  • 24/7 customer support, Secure shopping site
  • Free One year updates to match real exam scenarios
  • If you failed your exam after buying our products we will refund the full amount back to you.

[Dec 04, 2021] DumpTorrent PDII Exam Practice Test Questions (Updated 325 Questions) [Q132-Q153]

Share

[Dec 04, 2021] DumpTorrent PDII  Exam Practice Test Questions (Updated 325 Questions)

Pass Salesforce PDII Exam Info and Free Practice Test 


Salesforce Certified Platform Developer II (PDII) Exam

Salesforce Certified Platform Developer II (PDII) Exam is related to Salesforce Certified Platform Developer II Certification. This exam validates the Candidate knowledge and skills knowledge in advanced programmatic capabilities of the Lightning Platform and data modeling to develop complex business logic and interfaces. It also deals with the ability of Candidate to design, develop, test, and deploy programmatic solutions that are reusable, maintainable, and follow design patterns and object-oriented programming best practices.

NEW QUESTION 132
A developer is asked to update data in an org based on new business rules. The new rules state that Accounts with the type set to 'Customer' should have a status of 'Active', and Accounts with the type set to 'Prospect' should have a status of 'Pending'. No other changes to data should be made.
Which code block will accurately meet the business requirements?
Map<String, String> statusMap = new Map<String, String>{'Customer'=>'Active',

  • A. for ( Account a : [SELECT Id, Type FROM Account]){
    a.Status = a.Type == 'Customer' ? 'Active' : 'Pending';
    accountUpdates.add(a);
    }
    update accountUpdates;
  • B. for ( Account a : [SELECT Id, Type FROM Account]){
    if ( String.isNotBlank(a.Type) && a.Type == 'Customer' ){
    a.Status = 'Active';
    }
    if ( String.isNotBlank(a.Type) && a.Type == 'Prospect' ){
    a.Status = 'Pending';
    }
    accountUpdates.add(a);
    }
    update accountUpdades;
    List<Account> accountUpdates = new List<Account>();
  • C. 'Prospect'=>'Pending'}
    List<Account> accountUpdates = new List<Account>();
    for ( Account a : [SELECT Id, Type FROM Account WHERE Status IN
    :statusMap.keySet()]){
    a.Status = statusMap.get(a.Type);
    accountUpdates.add(a);
    }
    update accountUpdates;
    List<Account> accountUpdates = new List<Account>();
  • D. 'Prospect'=>'Pending'}
    List<Account> accountUpdates = new List<Account>();
    for ( Account a : [SELECT Id, Type FROM Account]){
    if ( statusMap.containsKey(a.Type) ) {
    a.Status = a.Type == 'Customer' ? 'Active' : 'Pending';
    }
    accountUpdates.add(a);
    }
    update accountUpdates;
    Map<String, String> statusMap = new Map<String, String>{'Customer'=>'Active',

Answer: A

 

NEW QUESTION 133
An Apex trigger and Apex class increment a counter, Edit_Count_c, any time that the Case is changed.

A new process on the case object was just created in production for when a Case is created or updated< since the process was created, they are reports that the Count is being incremented by more than one on Case edit.
Which change in the Apex code will fix the problem?
A)

B)

C)

D)

  • A. Option D
  • B. Option B
  • C. Option A
  • D. Option C

Answer: C

 

NEW QUESTION 134
Choose the correct definition for <apex:actionFunction>.

  • A. Allows for controller methods to be called directly from Javascript. Must be| encapsulated in
    <apex:form> tags. Unlike actionSupport, these function<apex:actionPoller>s can be called directly from Javascript code B Sends an AJAX request according to the time interval you specify. If this ever gets re-rendered, it resets
  • B. Adds AJAX support to another component (e.g. onClick, onMouseUp, onFocus, etc.)
  • C. Can be associated with an AJAX request (actionFunction/actionSupport/actionPoller) and shows content conditionally depending on the status of the request (in progress/complete). Use the "id" field to specify name; use "status" field on related components to connect them
  • D. Signifies which components should be processed by the server when an AJAX request is generated

Answer: D

 

NEW QUESTION 135
A developer has a Batch Apex process, Batch_Account_Sales, that updates the sales amount for 10,000 Accounts on a nightly basis. The Batch Apex works as designed In the sandbox. However, the developer cannot get code coverage on the Batch Apex class.
The test class is below:

What is causing the code coverage problem?

  • A. The batch needs more than one account record created.
  • B. The batch process will not recognize new accounts created in the same session
  • C. The account creation already sets the sates amount to 0.
  • D. The executeBatch must fail within test. startTest ( ) and - test. stopTest().

Answer: B

 

NEW QUESTION 136
What should be added to the setup, in the location indicated, for the unit test above to create the controller extension for the test?
A)

B)

C)

D)

  • A. Option D
  • B. Option B
  • C. Option A
  • D. Option C

Answer: D

 

NEW QUESTION 137
To reduce the amount of time needed to write test coverage, a developer wants to use a spreadsheet uploaded as a Static Resource to supply test data in a test method. What code can the developer use to accomplish this?

  • A. List< sObject> testAccounts = Test . loadData( [Select Id,Body from StaticResource Where Name
    =testAccounts
  • B. List< sObject> testAccounts = Test . loadData (Account .sObjectType, SResource. testAccounts)
  • C. List< sObject> testAccounts = (List< Count>) [Select Id, Body from StaticResource Where Name = testAccounts
  • D. < meta charset="utf-8" />List< sObject> testAccounts = Test . loadData (Account.sObjectType, ' testAccounts');

Answer: D

 

NEW QUESTION 138
Assuming the CreateOneAccount class creates one account and implements the Queuetable interface, which syntax tests the Apex code?
A)

B)

C)

D)

  • A. Option D
  • B. Option A
  • C. Option C
  • D. Option B

Answer: D

 

NEW QUESTION 139
The Bulk API__________.

  • A. Is used to create, retrieve, update or delete records, such as accounts, leads, and custom objects, and allows you to maintain passwords, perform searches, and much more
  • B. Provides a powerful, convenient, and simple REST-based web services interface for interacting with Salesforce. Its advantages include ease of integration and development, and it's an excellent choice of technology for use with mobile applications and web projects
  • C. Is used to retrieve, deploy, create, update, or delete customizations for your org. The most common use is to migrate changes from a sandbox or testing org to your production environment
  • D. Is based on REST principles and is optimized for loading or deleting large sets of data. You can use it to query, queryAII, insert, update, upsert, or delete many records asynchronously by submitting batches

Answer: D

 

NEW QUESTION 140
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.)

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

Answer: A,C

 

NEW QUESTION 141
A managed package uses a list of country ISO codes and country names as references data in many different places.. managed package Apex code.
What is the optimal way to store and retrieve the list?

  • A. Store the information in a list Custom Setting and access it with the getAll() method
  • B. Store the information in Custom Metadata and query it with SOQL.
  • C. Store the information in a List Custom Setting and query it with SOQL.
  • D. Store the information in Custom Metadata and access it with the getAll() method.

Answer: B

 

NEW QUESTION 142
UC Loans is a small company with a part time Salesforce administrator. UC Loans wants to create a Loan__c record whenever an Opportunity is won. What is the optimal solution for UC Loans to accomplish this?

  • A. Process Builder
  • B. Apex Trigger
  • C. Quick Action
  • D. Workflow Rule

Answer: A

 

NEW QUESTION 143
The Contact object has a custom field called "Zone." Its data type is "Text" and field length is 3.
What is the outcome after executing the following code snippet in the org?
List<Contact> contactsToBeInserted=new List<Contact>(); Contact contactInstance= new Contact(LastName='Smith', Department='Tech', Zone_c='IAD'); contactsToBeInserted.add(contactInstance); contactInstance= new Contact (LastName='Sm1th', Department='Tech', Zone_c='PITT'); contactsToBeInserted.add (contactInstance); Database.insert(contactsToBeInserted,true);

  • A. Both inserts succeed and the contact record that has the Zone value of 'PITT' is truncated
  • B. Both inserts succeed and the contact record that has the Zone value of 'PI'I'I' is set to NULL
  • C. An unhandled DML exception is thrown and no contact records are inserted
  • D. A partial insert succeeds and the contact record that has the Zone value 'IAD' is inserted

Answer: C

 

NEW QUESTION 144
What is the correct syntax for calling a controller action from a Visualforce page and updating part of the page once the action is completed? Choose 2 answers

  • A. < apex:commandButton action="{ !Save}" value="Save" redraw="thePageBlock"/>
  • B. < apex: commandFunction action="{ !Save}" value="Save" rendered="thePageBlock"/>
  • C. < apex:actionSupport action="{ !Save} " event="" rerender="thePageBlock"/>
  • D. < apex:actionFunction action="{ !Save}" name="Save" rerender="thePageBlock"/>

Answer: C,D

 

NEW QUESTION 145
A developer needs to create a service that will process an email sent to it and create an account and contact using the contents of the email as data for the records.
How might a developer accomplish this requirement?

  • A. Use Heroku Data Clips to Process Email
  • B. Use the Apex Inbound Email Handler
  • C. Use Auto-launched Flow and Process Builder
  • D. Use the Fuel API with Email Data Extensions

Answer: B

 

NEW QUESTION 146
A managed package uses a list of country ISO codes and country names as reference data in many different places from within the managed package Apex code.
What is the optimal way to store and retrieve the list?

  • A. Store the information in a List Custom Setting and access it with the getAll() method
  • B. Store the information in a List Custom Setting and query it with SOQL
  • C. Store the information in Custom Metadata and query it with SOQL
  • D. Store the information in Custom Metadata and access it with the getAll() method

Answer: A

Explanation:
Explanation/Reference: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/ apex_customsettings.htm

 

NEW QUESTION 147
A company has a custom object Sales_Help_Request__c that has a Lookup relationship to Opportunity. The Sales_Help_Request__c has a number field, Number_of_Hours__c, that represents the amount of time spent on the Sales_Help_Request__c.
A developer is tasked with creating a field, Total_Hours__c, on Opportunity that should be the sum of all of the Number_of_Hours__c values for the Sales_Help_Request__c records related to that Opportunity.
What should the developer use to implement this?

  • A. A trigger on the Opportunity object
  • B. A roll-up summary field on the Opportunity object
  • C. A workflow rule on the Sales_Help_Request__c object
  • D. A trigger on Sales_Help_Request__c

Answer: A

 

NEW QUESTION 148
What is the transaction limit for SOQL queries?

  • A. 20 (synchronous), 200 (async)
  • B. 200 (synchronous), 100 (async)
  • C. 150 (synchronous), 20 (async)
  • D. 150 (synchronous), 200 (async)
  • E. 100 (synchronous), 200 (async)

Answer: E

 

NEW QUESTION 149
A user receives the generic "An internal server error has occurred" while interacting with a custom Lightning Component.
What should the developer do to ensure a more meaningful message?

  • A. Use an AuraHandledException in a try/catch block.
  • B. Add an onerror event handler to the tag.
  • C. Use ProcessBuilder to catch the error.
  • D. Add an error-view component to the markup.

Answer: A

Explanation:
Explanation

 

NEW QUESTION 150
Choose the correct definition for <apex:actionFunction>.

  • A. Adds AJAX support to another component (e.g. onClick, onMouseUp, onFocus, etc.)
  • B. Signifies which components should be processed by the server when an AJAX request is generated
  • C. Can be associated with an AJAX request (actionFunction/actionSupport/actionPoller) and shows content conditionally depending on the status of the request (in progress/complete). Use the "id" field to specify name; use "status" field on related components to connect them
  • D. Allows for controller methods to be called directly from Javascript. Must be encapsulated in
    <apex:form> tags. Unlike actionSupport, these function<apex:actionPoller>s can be called directly from Javascript code
  • E. Sends an AJAX request according to the time interval you specify. If this ever gets re-rendered, it resets

Answer: D

 

NEW QUESTION 151
How can Apex class functionality be exposed for invocation from a Lightning process? Choose 2 answers

  • A. Extend the ProcessInvocable base class.
  • B. Expose the class as a custom REST API.
  • C. Implement the Process.Plugin interface.
  • D. Use the @InvocableMethod annotation.

Answer: C,D

 

NEW QUESTION 152
What is the transaction limit for the number of records using QueryLocator?

  • A. 5,000,000
  • B. 100,000
  • C. 50,000,000
  • D. There is no limit
  • E. 50,000

Answer: C

Explanation:
Explanation
Explanation/Reference:
"Scope" parameter in "executeBatch" can be set up to 2,000 records

 

NEW QUESTION 153
......


How much PDII Exam Cost

The price of the Salesforce Certified Platform Developer II (PDII) Exam is $200 USD.


PDII Exam topics

Candidates must know the exam topics before they start of preparation. Because it will really help them in hitting the core. Our Salesforce PDII dumps will include the following topics:

  • Debug and Deployment Tools 5%
  • Logic and Process Automation 33%
  • Salesforce Fundamentals 5%
  • Testing 12%
  • User Interface 20%
  • Performance 7%
  • Data Modeling and Management 7%
  • Integration 11%

Pass Your Salesforce Exam with PDII Exam Dumps: https://www.dumptorrent.com/PDII-braindumps-torrent.html

PDII Exam Dumps PDF Updated Dump from  DumpTorrent Guaranteed Success: https://drive.google.com/open?id=1-uYaXl35e7EX1p4WkSCVKxYwdh6FixKi