Practice Free PDII Exam Online Questions
Users upload .csv files in an external system to create account and contact records in Salesforce. Up to 200 records can be created at a time. The users need to wait for a response from Salesforce in the external system, but the data does not need to synchronize between the two systems.
Based on these requirements, which method should a developer use to create the records in Salesforce?
- A . REST API request using composite/vbatch/
- B . REST API request using composite/tree/
- C . Apex web services
- D . Bulk API 2.0
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?
- 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.
The Contact object in an org is configured with workflow rules that trigger field updates.
The fields are not updating, even though the end user expects them to. The developer creates a debug log to troubleshoot the problem.
What should the developer specify in the debug log to see the values of the workflow rule conditions and debug the problem?
- A . INFO level for the Database log category
- B . ERROR level for the Workflow log category
- C . ERROR level for the Database log category
- D . INFO level for the Workflow log category
A developer is asked to look into an issue where a scheduled Apex is running into DML limits. Upon investigation, the developer finds that the number of records processed by the scheduled Apex has recently increased to more than 10,000.
What should the developer do to eliminate the limit exception error?
- A . Use the @future annotation.
- B . Implement the Bathable interface.
- C . Use platform events.
- D . Implement the Queueable interface.
Refer to the test method below:
An external system with Account information and sets the Account’s Integration-Updated___ c checkbox to True when it completes.
The test fails to execute and exits with an error: "Methods defined as TestMethod do not support Web service callouts."
What is the optimal way to fix this?
- A . Add if (‘Test.isRunningTest I)) around calloutUtil.sendAccountUpdate.
- B . Add Test.startTest ()before and Test.stopTest () after CallcutoutUtil. sendAccoutUpdate.
- C . Add Test.startTest before and Test.setMock and Test. stoptest () after CallloutUtil.sendAccountUpdate.
- D . Add Test.startTest() and Test .setMock before and Test.stopTest () after CalloutUtil.sendAccountUpdate.
A developer created a JavaScript library that simplifies the development of repetitive tasks and features and uploaded the library as a static resource called jsutils in Salesforce. Another developer is coding a new Lightning web component (LWC) and wants to leverage the library.
Which statement properly loads the static resource within the LWC?
- A . import {jsUtilities} from ‘@salesforce/reaourceUrljsUtila’;
- B . import jUtilities from ‘@salesforce/reaourceUrljsUtila’;
- C . <lightning-require scripts=N { ! SReaource. j sUtils}’’/>
- D . const jsUtility = SA.get (‘SReaource.jsUtils’);
A Visualforce page loads slowly due to the large amount of data it displays.
Which strategy can a developer use to improve the performance?
- A . use lazy loading to load the data on demand, instead of in the controller’s constructor.
- B . use an <apex:actionPoller> in the page to load all of the data asynchronously.
- C . use Javascript to move data processing to the browser instead of the controller.
- D . Use the transient keyword for the List variables used in the custom controller.
The Salesforce admin at cloud kicks created a custom object called Region_ c to store all postal zip codes in the United States and the Cloud Kicks sales region the Zip code belong to.
Object Name:
Fields:
Cloud Kicks wants a trigger on the Lead to populate the Region based on the Lead’s zip code.
Which code segment is the most efficient way to fulfill this request?
A)
B)
C)
- A . Option A
- B . Option B
- C . Option C
Salesforce users consistently receive a "Maximum trigger depth exceeded" error when saving m Account.
How can a developer fix this error?
- A . Split the trigger logic into two separate triggers.
- B . Modify the trigger to use the isMultiThread=true annotation.
- C . Convert trigger to use the ©future annotation, and chain any subsequent trigger invocations to the Account object.
- D . Use a helper class to set a Boolean to TRUE the first time a trigger is fired, and then; modify the trigger to only fire when modify the trigger to only fire when the Boolean is FALSE.
The Account object has a field, auais_Code__c, that is used to specify what type of auditing the Account needs and a Lookup to User, Ruditor_c, that is the assigned auditor.
When an Account is initially created, the user specifies the Audit_Code__c. Each User in the org has a unique text field, Rudi. that is used to automatically assign the correct user to the Account’s Auditor__c field.
What should be changed to most optimize the code’s effidency? Choose 2 answers
- A . Build a Mep<String, list<Account>> of audit code to accounts,
- B . Add an initial SOQL query to get all distinct audit codes.
- C . Sulld eMepcié, List<String> of Account I¢ to aucit codes.
- D . Add a WHERE clause to the SOQL query to filter on audit codes.