Best Preparations of PDII Exam 2021 Salesforce Developers Unlimited 325 Questions
Focus on PDII All-in-One Exam Guide For Quick Preparation.
NEW QUESTION 67
A company has code to update a Request and Request Lines and make a callout to their external ERP system's REST endpoint with the updated records.
The CalloutUtil. makeRestCallout fails with a 'You have uncommitted work pending. Please commit or rollback before calling out' error. What should be done to address the problem?
- A. Change the CalloutUtil.makeRestCallout to an @InvocableMethod method.
- B. Move the CalloutUtil.makeRestCallout method call below the catch block.
- C. Remove the Database.setSavepoint and Database.rollback.
- D. Change the CalloutUtil.makeRestCallout to an @future method
Answer: D
NEW QUESTION 68
The Contact object has a custom field called "Zone." Its data type is "Text" and field length is 3. What is the outcome after executing the following code snippet in the org?
- A. Both inserts succeed and the contact record that has the Zone value of PITT is truncated
- B. Both inserts succeed and the contact record that has the Zone value of 'PI'IT is set to NULL
- C. A partial insert succeeds and the contact record that has the Zone value 'IAD1 is inserted
- D. An unhandled DML exception is thrown and no contact records are inserted
Answer: D
NEW QUESTION 69
A developer has been asked to create code that will meet the following requirements: Receives input of:
Map<Id, Project__c>, List<Account> Performs a potentially long-running callout to an outside web service Provides a way to confirm that the process executed successfully Which asynchronous feature should be used?
- A. @future (callout=true)
- B. Schedulable interface
- C. Queueable interface
- D. Database.AllowsCallouts interface
Answer: A
NEW QUESTION 70
What is a technique to maximize code re-use within Visualforce pages? Choose 3 answers
- A. Creating reusable page sections with .
- B. Creating reusable Visualforce Components with .
- C. Referencing an existing page With .
- D. Creating Visualforce Templates With .
- E. Defining reusable page regions with .
Answer: B,C,D
NEW QUESTION 71
Refer to the markup below:
A Lightning web component displays the Account name and two custom fields out of 275 that exist on the object. The developer receives complaints that the component performs slowly.
What can the developer do to improve the performance?
A)
B)
C)
D)
- A. Option D
- B. Option C
- C. Option A
- D. Option B
Answer: B
NEW QUESTION 72
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 both the insertion and mock callout occur after the Test.stopTest()
- C. Ensure the records are inserted before the Test.startTest() statement and the mock callout after the Test.startTest()
- D. Ensure the records are inserted before the Test.startTest() statement and the mock callout occurs within a method annotated with @testSetup
Answer: C
NEW QUESTION 73
A company's support process dictates that any time a Case is closed with a Status of 'Could not fix,' an Engineering Review custom object record should be created and populated with information from the Case, the Contact, and any of the Products associated with the Case. What is the correct way to automate this using an Apex trigger?
- A. An after update trigger that creates the Engineering Review record and inserts it
- B. An after upsert trigger that creates the Engineering Review record and inserts it
- C. A before upsert trigger that creates the Engineering Review record and inserts it
- D. A before update trigger that creates the Engineering Review record and inserts it
Answer: A
NEW QUESTION 74
An environment has two Apex Triggers: an after-update trigger on Account and an after-update trigger on Contact. The Account after-update trigger fires whenever an Account's address is updated, and it updates every associated Contact with that address. The Contact after-update trigger fires on every edit, and it updates every Campaign Member record related to the Contact with the Contact's state.
Consider the following: A mass update of 200 Account records' addresses, where each Account has 50 Contacts. Each Contact has 1 Campaign Member. This means there are 10,000 Contact records across the Accounts and 10,000 Campaign Member records across the contacts.
What will happen when the mass update occurs?
- A. There will be no error, since each trigger fires within its own context and each trigger does not exceed the limit of the number of records processed by DML| statements.
- B. There will be no error, since the limit on the number of records processed by DML statements is 50,000.
- C. The mass update will fail, since the two triggers fire in the same context, thus exceeding the number of records processed by DML statements.
- D. The mass update of Account address will succeed, but the Contact address updates will fail due to exceeding number of records processed by DML statements.
Answer: A
NEW QUESTION 75
The REST API __________.
- A. Is used 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
- 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. 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
- D. Is used to create, retrieve, update or delete records, such as accounts, leads, and custom objects, and allows you to maintain passwords, perform searches, and much more
Answer: C
Explanation:
Explanation
NEW QUESTION 76
How can a developer efficiently incorporate multiple JavaScript libraries, such as JQuery and MomentJS, in a Lightning component?
- A. Join multiple assets from a static resource
- B. Implement the libraries in separate helper files
- C. Use CDNs with script attributes
- D. Use JavaScript remoting and script tags
Answer: A
NEW QUESTION 77
A developer is writing a Visualforce page that queries accounts in the system and presents a data table with the results. The users want to be able to filter the results based on up to five fields. However, the users want to pick the five fields to use as filter fields when they run the page.
Which feature of Apex code is required to facilitate this solution?
- A. describeSObjects()
- B. Dynamic Schema binding
- C. SOSL queries
- D. REST API
Answer: A
NEW QUESTION 78
A company has a custom object, Sales Demo Request, that has a lookup to an Opportunity. It is required that a Sales Demo Request record be created when an Opportunity's Probability is greater than 50%.
What is the optimal way to automate this?
- A. Create a Workflow on Opportunity.
- B. Build a Process on Opportunity.
- C. Build a Flow on Opportunity.
- D. Use an Apex Trigger on Opportunity.
Answer: D
Explanation:
Explanation/Reference:
NEW QUESTION 79
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 2 answers
- A. Use OFFSET in SOQL queries.
- B. Use LIMIT 50 in SOQL queries.
- C. Use a StandardSetController.
- D. Use CURSOR 50 in SOQL queries.
Answer: A,B
NEW QUESTION 80
A developer wants to create a Visualforce page that allows a user to search for a given account by Name. If the account is found, the account details should be populated on screen. If no account is found, an error message should be displayed to the user.
How can this be accomplished? (Choose two.)
- A. Use the account.addError() method to add the error message
- B. Use the <apex:pageMessages> tag to display the error message
- C. Use the ApexPages.addMessage() method to add the error message
- D. Use the (apex: information) tag to display the error message
Answer: B,C
Explanation:
Explanation/Reference:
NEW QUESTION 81
A company needs to automatically delete sensitive information after seven years. This could delete almost a million records every day.
How can this be achieved?
- A. Use aggregate functions to query for records older than seven years, and then delete the AggregateResultobjects
- B. Schedule a batch Apex process to run every day that queries and deletes records older than seven years
- C. Schedule an @futureprocess to query records older than seven years, and then recursively invoke itself in 1,000 record batches to delete them
- D. Perform a SOSL statement to find records older than 7 years, and then delete the entire result set
Answer: A
NEW QUESTION 82
......
Guaranteed Success with PDII Dumps: https://www.dumpsreview.com/PDII-exam-dumps-review.html
Pass Salesforce PDII Exam – Experts Are Here To Help You: https://drive.google.com/open?id=14ZuoS6UfnADxamHEllBbbkIs2udGSljE

