Salesforce PDII Sample Questions

Question # 61

Given the following code:

Assuming there were 10 Contacts and five Accounts created today, what is the expected result?  

A. System. QueryException: List has more than one row after Assignment on Account. 
B. System. LimitException: To many SOQL Queries on Account. 
C. System. QueryException: To many DML Statement errors on Contact 
D. System. LimitException: Too many SOQL Queries on Contract 


Question # 62

How should a developer reference a third-party JavaScript library from a Lightning component?  

A. From an asset file 
B. From a document 
C. From a static resource 
D. From a third-party URL 


Question # 63


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. Add TeststartTest() before Line 18 of the code and add Test.stopTest() after line 18 of the code. 
D. Replace most of the Apex Trigger with Process Builder processes to reduce the number of queries in the trigger. 


Question # 64

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

A. Scheduling a batch process to complete in the future 
B. Processing high volumes of records 
C. Updating a record after the completion of an insert 
D. Calling a web service from an Apex trigger 


Question # 65

A company uses a custom-built enterprise resource planning (ERP) system to handle order management. The company wants Sales Reps to know the status of orders so that if a customer calls to ask about their shipment, the Sales Rep can advise the customer about the order's status and tracking number if it is already shipped. Which two methods can make this ERP order data visible in Salesforce? Choose 2 answers 

A. Ensure real-time order data is in Salesforce using the Streaming API. 
B. Write a cron job In Salesforce to poll the ERP system for order updates. 
C. Have the ERP system push the data into Salesforce using the SOAP API. 
D. Use Salesforce Connect to view real-time Order data in the ERP system. 


Question # 66

A developer created a Lightning web component that uses a Lightning-record-edit-force to collect information about Leads. Users complain that they only see one error message at a time when they save a Lead record. What can the developer use to perform the validations, and allow multiple error messages to be displayed simultaneously?

A. Apex REST 
B. External JavaScript Library 
C. Apex Trigger 
D. Process Builder


Question # 67

After a Platform Event is defined in a Salesforce org, events can be published via which two mechanisms? Choose 2 answers  

A. internal Apps can use Outbound Messages 
B. Internal Apps can use Process Builder. 
C. External Apps require a custom Apex web service. 
D. External Apps can use the standard Streaming API. 


Question # 68

Users report that a button on a custom Lightning Web Component is not working. However, there are no other details provided. What should the developer use to ensure error messages are properly displayed?

A. Add the tag to the component. 
B. Use the Database method with allOrNone set to false. 
C. Add a Try/Catch block surrounding the DML statement. 
D. Add JavaScript and HTML to display an error message. 


Question # 69

Assuming the CreateOneAccount class creates one account and implements the Queuetable interface, which syntax tests the Apex code? 

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


Question # 70

A developer wrote an Apex class to make several callouts to an external system. If the URLs used in these callouts will change often, which feature should the developer use to minimize changes needed to the Apex class?

A. Session Id 
B. Connected Apps 
C. Remote Site Settings 
D. Named Credentials 


‹ First56

Download All Questions PDF Check Customers Feedbacks