[Dec 27, 2023] New Salesforce PDII Dumps with Test Engine and PDF (New Questions)
Pass Your PDII Exam Easily - Real PDII Practice Dump Updated
NEW QUESTION # 27
A company wants to incorporate a third-party web service to set the Address fields when an Account is inserted, if they have not already been set.
What is the optimal way to achieve this?
- A. Create an Apex trigger, execute a Queueable job from it, and make a callout from the Queueable job.
- B. Create a Workflow Rule, execute a Queueable job from it, and make a callout from the Queueable job.
- C. Create a Before Save Flow, execute a Queueable job from it, and make a callout from the Queueable job.
- D. Create a Process, execute a Queueable job from it, and make a callout from the Queueable job.
Answer: A
NEW QUESTION # 28
A Lightning Component functions in preview mode and needs to be used inside a Lightning App Builder page, but it is not available.
What change should be applied to the component?
- A. Delete the component, metadata, and Apex controller and recreate them.
- B. Expose it in the markup using the implements and access attributes.
- C. Look for errors in the logic in the JavaScript controller.
- D. Refresh the sandbox and upgrade it to the latest API version.
Answer: B
NEW QUESTION # 29
A developer has created a Visualforce page that uses a thirdparty JavaScript framework. The developer has decided to supply data to the JavaScript functions using JavaScript Remoting for Apex Controllers. What is the correct syntax to declare a remote method in Apex? Choose 2 answers
- A. @Remoteobject ' global static String gettable
- B. @RemoteAction global String getTable()
- C. @RemoteAction global static String getTable()
- D. @RemoteAction public static String getTable()
Answer: C,D
NEW QUESTION # 30
A company has a custom object. Request__c. that has a field, Completed__c. and a Lookup to Opportunity, Opportunity__c.
Which SOQL query will get a unique list of all of the Opportunity records that have a Completed Request?
- A.

- B.

- C.

- D.

Answer: B
NEW QUESTION # 31 
The test method above tests an Apex trigger that the developer knows will make a lot of queries when a lot of Account are simultaneously updated to be customer.
The test method fails at the Line 20 because of too many SOQL queries
What is the correct way to fix this?
The test method above tests an Apex trigger that the developer knows will make a lot of queries when a lot of Accounts are simultaneously updated to be customers.
The test method fails at the Line 20 because of too many SOQL queries.
What is the correct way to fix this?
- A. Add TesLstartTest() before and Test.stop Test() after both Line 7 of the code and Line 20 of the code.
- B. Change the DataFactory class to create fewer Accounts so that the number of queries in the trigger is reduced.
- C. Replace most of the Apex Trigger with Process Builder processes to reduce the number of queries in the trigger.
- D. Add TeststartTest() before Line 18 of the code and add Test.stopTest() after line 18 of the code.
Answer: D
NEW QUESTION # 32
A developer has working business logic code, but sees the following error in the test class:
You have uncommitted work pending. Please commit or rollback before calling out. What is a possible solution?
- A. Use test.IsRunningTest() before making the callout to bypass it in test execution.
- B. Set seeAIIData to "true" at the top of the test class, since the code does not fail in practice.
- C. Call support for help with the target endpoint, as it is likely an external code error.
- D. Rewrite the business logic and test classes with @TestVisible set on the callout.
Answer: A
NEW QUESTION # 33
A business currently has a process to manually upload orders from its external Order Management System (OMS) into Salesforce.
This is a labor intensive process since accounts must be exported out of Salesforce to get the IDs. The upload file must be updated with the correct account IDs to relate the orders to the corresponding accounts.
Which two recommendations should make this process more efficient?
Choose 2 answers
- A. Use the upsert wizard in the Data Loader to import the data.
- B. Ensure the data in the file is sorted by the order ID.
- C. Use the Insert wizard In the Data Loader to Import the data.
- D. Identify unique fields on Order and Account and set them as External IDs.
Answer: A,D
NEW QUESTION # 34
The maximum view state size of a visualforce page is __________.
- A. 65kb
- B. 165kb
- C. 256kb
- D. 135kb
- E. 1mb
Answer: D
NEW QUESTION # 35
Universal Containers wants to use a Customer Community with Customer Community Plus licenses so their customers can track how many containers they are renting and when they are due back. Many of their customers are global companies with complex Account hierarchies, representing various departments within the same organization. One of the requirements is that certain community users within the same Account hierarchy be able to see several departments' containers, based on a junction object that relates the Contact to the various Account records that represent the departments.
Which solution solves these requirements?
- A. An Apex Trigger that creates Apex Managed Sharing records based on the junction object's relationships
- B. A Visualforce page that uses a Custom Controller that specifies without sharing to expose the records
- C. A Custom Report Type and a report Lightning Component on the Community Home Page
- D. A Custom List View on the junction object with filters that will show the proper records based on owner
Answer: C
NEW QUESTION # 36
ABC Company has an Apex process that makes multiple extensive database operation and web service callouts. The database processes and web services can take a length time to run and must be run sequentially.
How should the developer write this Apex code without running into governor limits and system limitations?
- A. Use multiple @future methods for each process and callout.
- B. Use Limits class to stop entire process once governor limits are reached.
- C. Use Queueable Apex to chain the jobs to run sequentially.
- D. Use Apex Scheduler to scheduled each process.
Answer: C
NEW QUESTION # 37
Which interface needs to be implemented by a Lightning Component so that it may be displayed in modal dialog by clicking a button on a Lightning Record page?
- A. Lightning:editAction
- B. Fightning:quickAction
- C. Force: lightningQuickAction
- D. Force:lightningEditAction
Answer: B
NEW QUESTION # 38
Which is a valid Apex REST Annotation? (Choose two.)
- A. HttpUpsert
- B. HttpDelete
- C. HttpAction
- D. Http Patch
Answer: B,D
NEW QUESTION # 39
Which three Visualforce components can be used to initiate Ajax behavior to perform partial page updates? Choose 3 answers
- A. Two Visualforce Page Components leveraging Application Events
- B. Two Lightning Components leveraging Application Events
- C. A single visualforce Page leveraging Platform Events
- D. Two Lightning Components leveraging Platform Events
Answer: A,C
NEW QUESTION # 40
Choose the correct definition for <apex:messages>.
- A. No formatting; displays all errors on a page
- B. A single message, without formatting, that can be associated with a specific component on the page
- C. Standard Salesforce formatting, shows all errors that occur on page. Can add more messages through the
"ApexPages.addMessage" function - D. Standard Salesforce formatting, throws a specific message on a page
Answer: C
NEW QUESTION # 41
An Apex trigger creates a Contract record every time an Opportunity record is marked as Closed end Won. This trigger is working great, except (due to a recent acquisition) historical Opportunity records need to be loaded into the Salesforce instance.
When a test batch of records are loaded, the Apex trigger creates Contract records. A developer is tasked with preventing Contract records from being created when mass loading the Opportunities, but the daily users still need to have the Contract records created.
What is the most extendable way to update the Apex trigger to accomplish this?
- A. Use a Hierarchy Custom Setting to skip executing the logic inside the trigger for the user who loads the data.
- B. Use a List Custom Setting to disable the trigger for the user who loads the data.
- C. Add the Profile ID of the user who loads the data to the trigger so the trigger will not fire for this user.
- D. Add a Validation Rule to the Contract to prevent Contract creation by the user who loads the data.
Answer: A
NEW QUESTION # 42
What is the optimal syntax for adding a link to a case in a Visualforce page? (Choose two.)
<apex:outputLink value="{$URLFOR($Action.Case.Open, case)}" target="blank">
- A. apex:outputLink>
<apex:outputLink value="{!URLFOR($Action.Case.View,case.Id)}" target="blank"> - B. {Icase.Name} </apex:outputLink>
<apex:outputLink value="/{!case.Id}" target="blank"> {Icase.Name}</ - C. (LIE{!case.Name}</apex:outputLink>
<apex:outputLink value="!viewCase(case.Id)}" target="_blank">{Icase.Name} </ - D. apex:outputLink>
Answer: A,C
Explanation:
Explanation/Reference:
NEW QUESTION # 43
A developer has a test class that creates test data before making a mock call-out, but now receives a 'You have uncommitted work pending. Please commit or rollback before calling out' error.
What step should be taken to resolve the error?
- A. Ensure the records are inserted before the Test.startTest() statement and the mock callout after the Test.startTest()
- B. Ensure both the insertion and mock callout occur after the Test.startTest()
- C. Ensure both the insertion and mock callout occur after the Test.stopTest()
- D. Ensure the records are inserted before the Test.startTest() statement and the mock callout occurs within a method annotated with @testSetup
Answer: A
NEW QUESTION # 44
A developer writes the following code:
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. Move the web service callout into an future method
- C. Use the asyncSend() method of the HTTP class to send the request in async context
- D. Use Database.insert (order, true) to immediately commit any database changes
Answer: A,B
NEW QUESTION # 45
Which code statement includes an Apex method named updateAccount in the class AccountController for use in a Lightning web component?
- A. Import updateAccounts from AccountControllerupdateAccount';
- B. Import updateAccounts from @salesforceapex AccountController';
- C. Import updateAccounts from AccountController';
- D. Import updateAccounts from @salesforceapexAccountControllerupdateAccounts';
Answer: B
NEW QUESTION # 46
......
Salesforce Certified Platform Developer II (PDII) is an expert-level certification exam that measures your ability to design and develop custom business logic and interfaces using Apex and Visualforce. Salesforce Certified Platform Developer II (PDII) certification is intended for experienced developers who have a deep understanding of Salesforce's architecture and API capabilities. Passing the PDII exam demonstrates your proficiency and mastery in developing complex business solutions on the Salesforce platform.
VCETorrent just published the Salesforce PDII exam dumps!: https://prepaway.vcetorrent.com/PDII-valid-vce-torrent.html