Free PDII Sample Questions and 100% Cover Real Exam Questions (Updated 325 Questions)
Download Real Salesforce PDII Exam Dumps Test Engine Exam Questions
NEW QUESTION 149
Universal Containers wants to use an external Web Service provided by a third-party vendor to validate that shipping and billing addresses are correct. The current vendor uses basic password authentication, but Universal Containers might switch to a different vendor who uses OAuth. What would allow Universal Containers to switch vendors without updating the code to handle authentication?
- A. Custom Setting (List)
- B. Named Credential
- C. Custom Metadata
- D. Dynamic Endpoint
Answer: B
NEW QUESTION 150
There are user complaints about slow render times of a custom data table within a visualforce page that loads thousands of Account records at once.
What can a developer do to help alleviate such issues?
- A. Use the transient keyword in the Apex code when querying the Account records.
- B. Use JavaScript remoting to query the accounts.
- C. Use the standard Account List controller and implement pagination.
- D. Upload a third-party data table library as a static resource.
Answer: C
NEW QUESTION 151
A company manages information about their product offerings in custom objects named Catalog and Catalog Item. Catalog Item has a master-detail field to Catalog, and each Catalog may have as many as 100,000 Catalog Items.
Both custom objects have a CurrencylsoCode Text field that contains the currency code they should use. If a Catalog's CurrencylsoCode changes, all of its Catalog Items' CurrencylsoCodes should be changed as well.
What should a developer use to update the CurrencylsoCodes on the Catalog Items when the Catalog's CurrencylsoCode changes^5
- A. An after insert trigger on Catalog that updates the Catalog Items if the Catalog's CurrencylsoCode is different
- B. A Database.Schedulable and Database.Batchable class that queries the Catalog Item object and updates the Catalog Items if the Catalog CurrencylsoCode is different
- C. A Database.Schedulable and Database.Batchable class that queries the Catalog object and updates the Catalog Items if the Catalog CurrencylsoCode is different
- D. An after insert trigger on Catalog Item that updates the Catalog Items if the Catalog's CurrencylsoCode is different
Answer: C
NEW QUESTION 152
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 error-view component to the markup.
- C. Add an onerror event handler to the tag.
- D. Use ProcessBuilder to catch the error.
Answer: A
NEW QUESTION 153
A company wants to build a custom Lightning Component that will display a specified Account Field Set and that can only be added to the Account record page.
Which design resource configuration should be used?
<design:component label="Account FS Component">
- A. <aura:attribute name="fieldSetName" label="Field Set Name" />
< sfdc:objects>
<sfdc:object>Account</sfdc:object>
</sfdc:objects>
</design:component> - B. <design:attribute name="fieldSetName" Label="Field Set Name" />
<sfdc:objects>
sfdc:object>FieldSet</sfdc:object>
</sfdc:objects>
</design:component>
<design:component label="Account FS Component"> - C. <design:attribute name="fieldSetName" label="Field Set Name" />
<sfdc:objects>
<sfdc:object>Account</sfdc:object>
</sfdc:objects>
</design:component>
<design:component label="Account FS Component"> - D. <aura:attribute name="fieldSetName" label="Field Set Name" />
</sfdc:objects>
</sfdc:object>FieldSet</sfdc:object>
</sfdc:objects>
</design:component>
<design:component label="Account FS Component">
Answer: C
NEW QUESTION 154
A custom field Exec_Count_c of type Number is created on an Account object. An account record with value of
"1" for a: Exec_Count_c is saved. A workflow field update is defined on the Exec_Count_c field, to increment its value every time an account record is created or updated. The following trigger is defined on the account:
trigger ExecOrderTrigger on Account (before insert, before update, after insert, after update){ for (Account accountInstance: Trigger.New){ if (Trigger .
isBefore){ accountInstance Exec_Count_c += 1; } System. debug
(accountInstance.Exec_Count_c); } }
- A. 2, 2, 4, 4
- B. 1, 2, 3, 4
- C. 2, 2, 3, 3
- D. 1, 2, 3, 3
Answer: A
NEW QUESTION 155
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 both the insertion and mock callout occur after the Test.startTest()
- B. Ensure the records are inserted before the Test.startTest() statement and the mock callout 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: B
NEW QUESTION 156
Refer to re code segment above.
When following best practices for writing Apex taggers, which two lots are wrong or cause for concern? Choose 2 answers
- A. Line 20
- B. Line 11
- C. Line 6
- D. Line 16
Answer: A,C
NEW QUESTION 157
A developer wants to call an Apex Server-side Controller from a Lightning Aura Component.
What are two limitations to the data being returned by the Controller? (Choose two.)
- A. Lists of Custom Apex Classes cannot be returned by Apex Controllers called by Lightning Aura Components.
- B. A custom Apex Class can be returned, but only the values of public instance properties and methods annotated with @AuraEnabled are serialized and returned.
- C. Basic data types are supported, but defaults, such as maximum size for a number, are defined by the objects that they map to.
- D. Only Basic data types and sObjects are supported as return types for Apex Controllers called by Lightning Aura Components.
Answer: B,C
NEW QUESTION 158
REST uses __________.
- A. The HTTPRequest class
- B. The HTTPResponse class
- C. The HTTP class
- D. All of the above
Answer: D
Explanation:
CalloutException happens if an error occurs Classes begin with @RestResource(urlMapping='/yourUrl'), and methods can have annotations such as @HttpGet, @HttpPost, etc
NEW QUESTION 159
What is a potential design issue with the following code?
trigger accountTrigger on Account (before update){ Boolean processOpportunity = false; List<opportunity> opptysClosedLost = new List<opportunity>() List<opportunity> IstAllOpp = [select StageName from Opportunity where accountId IN :Trigger.newMap.keySet()]; if(!IstAllOpp.isEmpty()) processOpportunity = true; while(processOpportunity){ for(opportunity o : IstAllOpp) if(o.StageName
'Closed - Lost') opptysClosedLost.add(o); processOpportunity = false; if (!opptysClosedLost.isEmpty()) delete opptysClosedLost;
- A. The code will result in a System.DmlException:Entity_is_Deleted error
- B. The code will result in a System.LimitException: Apex CPU time limit exceeded error
- C. The code will result in a System.LimitException : Too many script statements error
- D. SOQL could be avoided by creating a formula field for StageName in Account from the related Opportunity
Answer: B
NEW QUESTION 160
Exhibit.
A developer created a JavaScript function as a part of a Lightning web component (LWC) that surfaces information... about leads by imperatively calling getFetchLeadList when certain criteria are met.
What are these changes the developer should implement in the Apex class above to ensure the LWC can displ... data efficiently while preserving security?
Choose 3 answers
- A. Implement the without sharing keyword in the class declaration.
- B. Use the WITH SECURITY_ENFORCED clause within the SOQL query.
- C. Annotate the Apex method with gAuraEnabled-
- D. Annotate the Apex method with 8AuraEnabled (Cacheable-true).
- E. Implement the with sharing keyword in the class declaration.
Answer: B,D,E
NEW QUESTION 161
What is the transaction limit for the number of records using QueryLocator?
- A. 50,000
- B. There is no limit
- C. 5,000,000
- D. 50,000,000
- E. 100,000
Answer: D
Explanation:
"Scope" parameter in "executeBatch" can be set up to 2,000 records
NEW QUESTION 162
A company has the Lightning Component above that allows users to dick a button to save their changes and redirects them to a different page. Currently, when the user hits the Save button the records are getting saved, but they are not redirected.
Which three techniques can a developer use to debug the JavaScript? Choose 3 answers
- A. Enable Debug Mode for Lightning components for the user.
- B. Use the browser's dev tools to debug the JavaScript.
- C. Use consde.log() messages in the JavaScript.
- D. Use Developer Console to view checkpoints.
- E. Use Developer Console to view the debug log.
Answer: A,B,C
NEW QUESTION 163
A developer must create a custom pagination solution for accessing approximately 2000 records and displaying 50 records on each page. Data from Salesforce will be accessed via an API and not via Apex.
How can the developer meet these requirements? (Choose two.)
- A. Use CURSOR 50 in SOQL queries
- B. Use LIMIT 50 in SOQL queries
- C. Use a StandardSetController
- D. Use OFFSET in SOQL queries
Answer: B,D
NEW QUESTION 164
A company needs to automatically delete sensitive information after 7 years. This could delete almost a million records every day.
How can this be achieved?
- A. Perform a SOSL statement to find records older than 7 years, and then delete the entire result set.
- B. Schedule a batch Apex process to run every day that Queries and deletes records older than 7 years.
- C. Use aggregate functions to query for records older than 7 years, and then delete the AggregateResult objects.
- D. Schedule an future process to Query records older than 7 years, and then recursively invoke itself in 1,000 record batches to delete them.
Answer: B
NEW QUESTION 165
A company has a custom component that allows users to search for records of a certain object type by invoking an Apex Controller that returns a list of results based on the user's input, when the search Is completed, a searchComplete event is fired, with the results put in a results attribute of the event. The component is designed to be used within other components and may appear on a single page more than once.
What is the optimal code that should be added to fire the event when the search has completed?
- A.

- B.

- C.

- D.

Answer: B
NEW QUESTION 166
A company exposes a REST web service and wants to establish two-way SSL between Salesforce and the REST web service. A certificate signed by an appropriate certificate authority has been provided to the developer.
What modification is necessary on the Salesforce side? (Choose two.)
- A. Update the code to use HttpRequest.setHeaderQ to set an Authorization header.
- B. Create an entry for the certificate in Certificate and Key Management
- C. Configure two-factor authentication with the provided certificate
- D. Update the code to use HttpRequest.setClientCertificateName()
Answer: B,D
NEW QUESTION 167
Universal Containers implements a private sharing model for the Convention_Attendence_c custom object. As part of a new quality assurance effort, the company created an Event___Reviewer__c user lookup field on the object. Management wants the event reviewer to automatically gain Read/write access to every record they are assigned to.
What is the best approach to ensure the assigned reviewer obtains Read/Write access to the record?
- A. Create criteria-based sharing rules on the Convention Attendee custom object to share the records with the Event Reviewers.
- B. Create a Before Insert trigger on the Convention Attendee custom object, and use Apex Sharing Reasons and Apex Managed Sharing.
- C. Create a criteria-based sharing rule on the Convention Attendee custom object to share the records the a group of Event Reviewers.
- D. Create an After Insert trigger on the Convention Attendee custom object, and use Apex Sharing Reasons and Apex Managed Sharing.
Answer: D
NEW QUESTION 168
......
New PDII exam dumps Use Updated Salesforce Exam: https://testinsides.dumps4pdf.com/PDII-valid-braindumps.html