Dec-2021 Latest DumpsReview PDII Exam Dumps with PDF and Exam Engine Free Updated Today!
Following are some new PDII Real Exam Questions!
NEW QUESTION 135
A developer needs to implement a system audit feature that allows users, assigned to a custom profile named "Auditors", to perform searches against the historical records in the Account object. The developer must ensure the search is able to return history records that are between 12 and 24 months old.
Given the code below, which select statement should be inserted below as a valid way to retrieve the Account History records ranging from 12 to 24 month old?
A)
B)
C)
D)
- A. Option D
- B. Option B
- C. Option A
- D. Option C
Answer: A
NEW QUESTION 136
1 Contact con = new Contact( LastName ='Smith', Department = 'Admin')
2 insert con;
3 Contact insertedContact=[select Name from Contact where id=:con.Id];
4 Savepoint sp_admin = Database.setSavepoint();
5 con.Department = 'HR';
6 update con;
7 Database.rollback(sp_admin);
8 System.debug(Limits.getDmlStatements());
Given the following code, what value will be output in the logs by line #8?
- A. 0
- B. 1
- C. 2
- D. 3
Answer: C
NEW QUESTION 137
What is a recommended practice with regard to the Apex CPU limit? (Choose two.)
- A. Reduce view state in Visualforce pages
- B. Optimize SOQL query performance
- C. Use Map collections to cache sObjects
- D. Avoid nested Apex iterations
Answer: C,D
NEW QUESTION 138 
The test method above calls a web service that updates 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 Test.startTest() and Test.setMock before and Test.stopTest() after CalloutUtil.sendAccountUpdate.
- B. Add if (!Test.isRunningTest()) around CalloutUtil.sendAccountUpdate.
- C. Add Test.startTest() before and Test.stopTest() after CalloutUtil.sendAccountUpdate.
- D. Add Test.startTest() before and Test.setMock and Test.stopTest() after CalloutUtil.sendAccountUpdate.
Answer: C
NEW QUESTION 139
After a Platform Event Is defined in a Salesforce org, events can be published via which two mechanisms?
Choose 2 answers
- A. External Apps use an API to publish event messages
- B. Internal Apps can use Outbound Messages.
- C. External Apps require the standard Streaming API
- D. Internal Apps can use Process Builder.
Answer: A,D
NEW QUESTION 140
What are the ways a developer can create test data of Contacts?
- A. Test.loadData(Contact.sObjectType, 'staticResource')
- B. myDataFactory.createContacts(10)
- C. Test.createTestData()
- D. Test.loadTestRecords(Contact.sObjectType, 'staticResource')
Answer: A,B
NEW QUESTION 141
global with sharing class MyRemoter {
public String accountName { get; set; }
public static Account account { get; set; }
public AccountRemoter() {}
@RemoteAction
global static Account getAccount(String accountName) {
account = [SELECT Id, Name, NumberOfEmployees
FROM Account WHERE Name = :accountName];
return account;
}
}
Consider the Apex class above that defines a RemoteAction used on a Visualforce search page.
Which code snippet will assert that the remote action returned the correct Account?
Account a = controller.getAccount('TestAccount');
- A. System.assertEquals( 'TestAccount', a.Name );
- B. System.assertEquals( 'TestAccount', a.Name );
MyRemoter remote = new MyRemoter(); - C. Account a = remote.getAccount ();
System.assertEquals( 'TestAccount', a.Name );
Account a = MyRemoter.getAccount('TestAccount'); - D. Account a = remote.getAccount('TestAccount');
System.assertEquals( 'TestAccount', a.Name );
MyRemoter remote = new MyRemoter('TestAccount');
Answer: A
NEW QUESTION 142
A company decides that every time an Opportunity is created, they want to create a follow up Task and assign it to the Opportunity Owner.
What should a developer use to implement the requirements?
- A. A Process Builder on Opportunity
- B. A trigger on Task
- C. A Process Builder on Task
- D. A trigger on Opportunity
Answer: A
NEW QUESTION 143
The Metadata API...
- A. 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
- B. Is based on REST principles and is optimized for loading or deleting large sets of data. You can use it to query, queryAll, insert, update, upsert, or delete many records asynchronously by submitting batches
- C. Is used to 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 used to to create, retrieve, update or delete records, such as accounts, leads, and custom objects, and allows you to allows you to maintain passwords, perform searches, and much more
Answer: C
NEW QUESTION 144
Which three actions must be completed in a Lightning web component for a JavaScript file in a static resource to be loaded?
Choose 3 answers
- A. Reference the static resource in a <script> tag.
- B. Import a method from the platformftesourceLoader,
- C. Append the static resource to the DOM.
- D. Call loadscript.
- E. Import the static resource.
Answer: B,D,E
NEW QUESTION 145
What is the transaction limit on the number of "sendEmail" method calls?
- A. 0
- B. There is no limit
- C. 1
- D. 2
- E. 3
Answer: D
Explanation:
The reserveEmailCapacity methods let you declare how many emails you want to send prior to actually sending, allowing you to handle limit errors prematurely
NEW QUESTION 146
A developer has built a multi-page wizard using a single Custom Controller to query and update data. Users are complaining that the pages are loading slowly. What will improve performance? Choose 3 answers
- A. Setting the Apex Page attribute cache=true.
- B. Reducing the view state.
- C. Using selective queries.
- D. Turning off the standard stylesheet.
- E. Using actionRegion and rerender.
Answer: A,B,C
NEW QUESTION 147
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 148
Line 1 public class AttributeTypes Line 2 { Line 3 private final String[] arrayItems; Line 4 Line 5
@AuraEnabled Line 6 public List<String> getStringArray() { Line 7 String*+ arrayItems = new String*+,
'red', 'green', 'blue' -; Line 8 return arrayItems; Line 9 } Line 10 } Consider the Apex controller above that is called from a Lightning Aura Component. What is wrong with it?
- A. Line 6: method must be static
- B. Line 8: method must first serialize the list to JSON before returning
- C. Lines 1 and 6: class and method must be global
- D. Line 1: class must be global
Answer: A
NEW QUESTION 149
Which use case is an appropriate fit for the @future asynchronous Apex method? (Choose two.)
- A. A developer has long-running methods and needs to prevent delaying an Apex transaction
- B. A developer has long-running jobs with large data volumes that need to be performed in batches
- C. A developer needs to segregate DML operations and bypass the mixed save DML error
- D. A developer has jobs that need larger query results than regular transactions allow
Answer: A,C
NEW QUESTION 150
Exhibit:
What can be done to improve the performance of the insert trigger shown above?
- A.

- B.

- C.

- D.

Answer: A
NEW QUESTION 151
A company recently deployed a Visualforce page with a custom controller that has a data grid of information about Opportunities in the org.
Users report that they receive a ''Maximum view state size limit'' error message under certain conditions.
According to Visualforce best practice, which three actions should the developer take to reduce the view state?
Choose 3 answers
- A. Use the transient keyword in the Apex controller for variables that do not maintain state.
- B. Use the final keyword In the controller for variables that will not change.
- C. Refine any SQQL queries to return only data relevant to the page.
- D. Use the private keyword in the controller for variables
- E. Use filters and pagination to reduce the amount of data.
Answer: A,C,E
NEW QUESTION 152
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: A
NEW QUESTION 153
......
Resources From:
- 2021 Latest DumpsReview PDII Exam Dumps (PDF & Exam Engine) Free Share: https://www.dumpsreview.com/PDII-exam-dumps-review.html
- 2021 Latest DumpsReview PDII PDF and PDII Exam Dumps Free Share: https://drive.google.com/open?id=14Vi8Dgv3NTwValoqj3MUxCRS60CcsdDB
Free Resources from DumpsReview, We Devoted to Helping You 100% Pass All Exams!

