DumpExams is an authorized company offering valid and latest dump exams & dumps VCE materials. Our dump exams & dumps VCE materials are high-quality; our passing rate is higher than others.

PDII Training & Certification Get Latest Salesforce Developers Updated on Sep 02, 2021 [Q87-Q111]

Share

PDII Training & Certification Get Latest Salesforce Developers Updated on Sep 02, 2021

Certification Training for PDII Exam Dumps Test Engine

NEW QUESTION 87
When testing batch classes, what must a developer do? (Choose two.)

  • A. Call the class' "execute" method
  • B. Use seeAllData=true
  • C. Encapsulate code in Test.startTest() and Test.stopTest()
  • D. Limit the amount of records you test to < 200

Answer: C,D

Explanation:
If you use "seeAllData=true," you are a bad person

 

NEW QUESTION 88
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?

  • A.
  • B.
  • C.
  • D.

Answer: B

 

NEW QUESTION 89
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 three.)

  • A. Using actionRegion and rerender
  • B. Reducing the view state
  • C. Turning off the standard stylesheet
  • D. Using selective queries
  • E. Setting the Apex Page attribute cache=true

Answer: B,D,E

 

NEW QUESTION 90
Code must have X% overall code coverage

  • A. X = 65
  • B. X = 100
  • C. X = 50
  • D. X = 75

Answer: D

 

NEW QUESTION 91
Universal Containers stores user preferences in a Hierarchy Custom Setting, User_Prefs_c, with a Checkbox field, Show_Help_c. Company-level defaults are stored at the organizational level, but may be overridden at the user level. If a user has not overridden preferences, then the defaults should be used.
How should the Show_Help_c preference be retrieved for the current user?

  • A. Boolean show = User_Prefs__c.getValues().Show_Help__c;
  • B. Boolean show = User_Prefs__c.Show_Help__c;
  • C. Boolean show = User_Prefs__c.getInstance().Show_Help__c;
  • D. Boolean show = User_Prefs__c.getValues(UserInfo.getUserId()).Show_Help__c;

Answer: D

Explanation:
Explanation/Reference: https://developer.salesforce.com/forums/?id=906F00000008ySqIAI

 

NEW QUESTION 92
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 1: class must be global
  • C. Line 8: method must first serialize the list to JSON before returning
  • D. Lines 1 and 6: class and method must be global

Answer: A

 

NEW QUESTION 93
A company has a custom object. Order__c, that has a custom picklist field. Status__c, with values of New, In Progress," or Fulfilled and a lookup field, Contact_c, to Contact.
Which SOQL query wrii return a unique list of all the Contact records that have no Fulfilled Orders?

  • A. SELECT iD FROM Contact WHERE id NOT IN (SELECT id From order_c WHERE_c = Fulfilled')
  • B. SELECT Contact_c FROM Order_c Where Status_c <> ;Fulfilled'
  • C. SELECT Contact_c From order_c Where id NOT IN (SELECT id FROM_c Where States_c + Fulfilled')
  • D. SELECT id FROM Contact WHERE id NOT IN (SELECT Contact _c FROM order_c Where Status_c = fulfilled')

Answer: D

 

NEW QUESTION 94
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 2 answers

  • A. Use the < apex:pageMessages > tag to display the error message.
  • B. Use the account.addError( ) method to add the error message.
  • C. Use the (apex: information) tag to display the error message.
  • D. Use the ApexPages.addMessage () method to add the error message.

Answer: A,D

 

NEW QUESTION 95
A developer must perform a complex SOQL query that joins two objects in a Lightning component. how can the Lightning component execute the query?

  • A. Invoke an Apex dass with the method annotated as ©AiraEnabled to perform the query.
  • B. Create a Process Builder to execute the query and invoke from the Lightning component.
  • C. Use the SaJesforce Streaming API to perform the SOQL query.
  • D. Write the query in a custom Lightning web component wrapper and invoke from the Lightning component.

Answer: A

 

NEW QUESTION 96
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 97
A customer requires that when the billing address field on an Account gets updated, the address field on all its related contact records should reflect the same update.
How can this requirement be met with minimal customizations?

  • A. Create a scheduled batch job that updates all contact address fields based on the related account record.
  • B. Create an After Trigger on Account to upd|ate its related contact records on update
  • C. Create a Lightning Process on Account to update related child Contact records
  • D. Create a Workflow Rule on Account to update related child Contact records

Answer: C

 

NEW QUESTION 98
What is a best practice when unit testing a controller? (Choose two.)

  • A. Set query parameters by using getParameters().put
  • B. Access test data by using seeAllData=true
  • C. Simulate user interaction by leveraging Test.setMock()
  • D. Verify correct references by using getURL()

Answer: A,D

 

NEW QUESTION 99
An org has a requirement that an Account must always have one and only one Contact listed as Primary. So selecting one Contact will de-select any others. The client wants a checkbox on the Contact called 'Is Primary' to control this feature. The client also wants to ensure that the last name of every Contact is stored entirely in uppercase characters. What is the optimal way to implement these requirements?

  • A. Write an after update trigger on Contact for the Is Primary logic and a separate before update trigger on Contact for the last name logic.
  • B. write an after update trigger on Account for the Is Primary logic and a before update trigger on Contact for the last name logic.
  • C. write a Validation Rule on the Contact for the Is Primary logic and a before update trigger on Contact for the last name logic.
  • D. write a single trigger on Contact for both after update and before update and callout to helper classes to handle each set of logic.

Answer: D

 

NEW QUESTION 100

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 1: class must be global
  • C. Line 8: method must first serialize the list to JSON before returning
  • D. Lines 1 and 6: class and method must be global

Answer: A

 

NEW QUESTION 101
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 102
A company requires that a child custom record is created when an Order record is inserted. The company's administrator must be able to make changes to the solution. What is the recommended solution for implementing this requirement?

  • A. Create a Force.com Workflow Rule to create the custom child record when the Order is inserted.
  • B. Create an Apex Trigger to create the custom child record when the Order is inserted.
  • C. Create a Visual Workflow that will create the custom child record when the Order is inserted.
  • D. Create a Lightning Process to create the custom child record when the Order is inserted.

Answer: D

 

NEW QUESTION 103
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. Using selective queries.
  • B. Using actionRegion and rerender.
  • C. Reducing the view state.
  • D. Turning off the standard stylesheet.
  • E. Setting the Apex Page attribute cache=true.

Answer: A,C,E

 

NEW QUESTION 104
A large company uses Salesforce across several departments. Each department has its own Salesforce Administrator. It was agreed that each Administrator would have their own sandbox in which to test changes.
Recently, users notice that fields that were recently added for one department suddenly disappear without warning. Also, Workflows that once sent emails and created tasks no longer do so. Which two statements are true regarding these issues and resolution? Choose 2 answers

  • A. A sandbox should be created to use as a unified testing environment instead of deploying Change Sets directly to production.
  • B. The administrators are deploying their own Change Sets, thus deleting each other's fields from the objects in production.
  • C. Page Layouts should never be deployed via Change Sets, as this causes Workflows and Field-level Security to be reset and fields to disappear.
  • D. The administrators are deploying their own Change Sets over each other, thus replacing entire Page Layouts and Workflows in Production

Answer: C,D

 

NEW QUESTION 105
When developing a Visualforce page that will be used by a global organization that does business in many languages and many currencies, which feature should be used? (Choose three.)

  • A. Custom Labels
  • B. convertCurrency()
  • C. getLocalCurrency()
  • D. Translation Workbenc
  • E. Global Labels

Answer: A,B,D

 

NEW QUESTION 106
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: C

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 107
Which three Visualforce components can be used to initiate Ajax behavior to perform partial page updates? Choose 3 answers

  • A. Option
  • B. Option
  • C. Option
  • D. Option
  • E. Option

Answer: B,C,E

 

NEW QUESTION 108
Choose the correct definition for <apex:messages>.

  • A. No formatting; displays all errors on a page
  • B. Standard Salesforce formatting, shows all errors that occur on page. Can add more messages through the
    "ApexPages.addMessage" function
  • C. A single message, without formatting, that can be associated with a specific component on the page
  • D. Standard Salesforce formatting, throws a specific message on a page

Answer: B

 

NEW QUESTION 109
A company has a custom object. Order__c, that has a custom picklist field. Status__c, with values of New, In Progress," or Fulfilled and a lookup field, Contact_c, to Contact.
Which SOQL query wrii return a unique list of all the Contact records that have no Fulfilled Orders?

  • A. SELECT iD FROM Contact WHERE id NOT IN (SELECT id From order_c WHERE_c = Fulfilled')
  • B. SELECT Contact_c FROM Order_c Where Status_c <> ;Fulfilled'
  • C. SELECT id FROM Contact WHERE id NOT IN (SELECT Contact _c FROM order_c Where Status_c
    = fulfilled')
  • D. SELECT Contact_c From order_c Where id NOT IN (SELECT id FROM_c Where States_c + Fulfilled')

Answer: C

 

NEW QUESTION 110
Which type of controller is best suited when you want all of the basic DML functions from an object's normal new/edit page?

  • A. Custom Controller
  • B. Standard List/Set Controller
  • C. Standard Controller
  • D. Controller Extensions

Answer: C

 

NEW QUESTION 111
......

Step by Step Guide to Prepare for PDII Exam: https://www.dumpexams.com/PDII-real-answers.html

Salesforce Developers PDII Real Exam Questions and Answers FREE Updated: https://drive.google.com/open?id=1ohtIYIIxXZAUJS7J3fa9TI9x4A3H8U5J