2021 Updated PDII PDF for the PDII Tests Free Updated Today! [Q32-Q57]

Share

2021 Updated PDII PDF for the PDII Tests  Free Updated Today!

Fully Updated Dumps PDF - Latest PDII Exam Questions and Answers

NEW QUESTION 32
How can Apex class functionality be exposed for invocation from a Lightning process? Choose 2 answers

  • A. Extend the ProcessInvocable base class.
  • B. Expose the class as a custom REST API.
  • C. Implement the Process.Plugin interface.
  • D. Use the @InvocableMethod annotation.

Answer: C,D

 

NEW QUESTION 33
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 a criteria-based sharing rule on the Convention Attendee custom object to share the records the a group of 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 an After Insert trigger on the Convention Attendee custom object, and use Apex Sharing Reasons and Apex Managed Sharing.
  • D. Create criteria-based sharing rules on the Convention Attendee custom object to share the records with the Event Reviewers.

Answer: C

 

NEW QUESTION 34
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 a single trigger on Contact for both after update and before update and callout to helper classes to handle each set of logic.
  • B. Write a Validation Rule on the Contact for the Is Primary logic and a before update trigger on Contact for the last name logic.
  • C. 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.
  • D. Write an after update trigger on Account for the Is Primary logic and a before update trigger on Contact for the last name logic.

Answer: A

Explanation:
Explanation/Reference:

 

NEW QUESTION 35
<lightning: layout multipleRows="true"> <lightning: layoutItem size="12">{!v.account.Name} </flighting:
layoutitem> <lightning:layoutitem 3ize="12">{!v. account .AccountNumber} </lighting: layoutitem>
<lightning: layoutitem size="12">{!v.account. Industry} </lighting: layoutitem> </lightning: layout> Refer to the component code above. The information displays as expected (in three rows) on a mobile device.
However, the information is not displaying as desired (in a single row) on a desktop or tablet. Which option has the correct component changes to display correctly on desktops and tablets?

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

Answer: C

 

NEW QUESTION 36
Global with sharing class MyRemoter { public String accountName { get; set; } public static Account account { get; set; } public AccountRemoter(} {} @RemoteAction global static Account getAccount (String acccuntName) { 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?

  • A. Account a = controller.getAccount('TestAccount');
    System.assertEquals(, 'TestAccount', a.Name } ;
  • B. MyRemoter remote = new MyRemoter();
    Account a = remote.getAccount ({'TestAccount');
    System.assertEquals, 'TestAcccunt', a.Name -;
  • C. MyRemoter remote = new MyRemoter('TestAccount'};
    Account a = remote.getAccount {);System.assertEquals(, ''TestAccount', a.Name -;
  • D. Account a = MyRemoter.getAccount ('TestAccount'):
    System.assertEquals{ 'TestAccount', a.Name };

Answer: D

 

NEW QUESTION 37
Consider the controller code above that is called from a Lightning component and returns data wrapped in a class.

Consider the controller code above that is called from a Lightning component and returns data wrapped in a class.
The developer verified that the Queries return a single record each and there is error handing in the Lightning component, but the component is not getting anything back when calling the controller getSomeData().
What is wrong?

  • A. The member's Name and Option should not have getter and setter.
  • B. Instances of Apex classes such as MyDataWrapper cannot be returned to a Lightning component.
  • C. The member's Name and Option should not be declared public.
  • D. The member's Name and Option of the class MyDataWrapper should be annotated with @AuraEnabled too.

Answer: D

 

NEW QUESTION 38
Which statement is true regarding both Flow and Lightning Process?

  • A. Are both server-side considerations in the Order of Execution.
  • B. Are able to be embedded directly into Visualforce pages.
  • C. Can use Apex that implements the Process. Plugin interface.
  • D. Can use Apex methods with the @InvocableMethod annotation.

Answer: D

 

NEW QUESTION 39
During the Visualforce Page execution, what step follows immediately after "Evaluate constructors on controller and extensions"?

  • A. Evaluate expressions, <apex:page> attribute actions, and other method calls (getters/setters) on main page
  • B. Evaluate constructors, extensions, and expression on attribute definitions on any custom components present
  • C. Send HTML to Browser
  • D. Create the view state

Answer: B

 

NEW QUESTION 40
An Apex trigger creates an Order__c record every time an Opportunity is won by a Sales Rep. Recently the trigger is creating two orders. What is the optimal method for a developer to troubleshoot this?

  • A. Turn off all Workflow Rules, then turn them on one at at time to see which one causes the error.
  • B. add system.debug() statements to the code and use the Developer Console logs to trace the code.
  • C. Run the Apex Test Classes for the Apex trigger to ensure the code still has sufficient code coverage.
  • D. Set up debug logging for every Sales Rep, then monitor the logs for errors and exceptions.

Answer: B

 

NEW QUESTION 41
What is the correct order of execution for Visualforce Page "get" requests (initial page visit)

  • A. 1) Evaluate constructors on controller and extensions
    2) Evaluate constructors, extensions, and expression on attribute definitions on any custom components present
    3) Evaluate expressions, <apex:page> attribute actions, and other method calls (getters/setters) on main page
    4) If there's a <apex:form> element, create the view state
    5) Send HTML to Browser
  • B. 1) Evaluate constructors, extensions, and expression on attribute definitions on any custom components present
    2) Evaluate constructors on controller and extensions
    3) Evaluate expressions, <apex:page> attribute actions, and other method calls (getters/setters) on main page
    4) If there's a <apex:form> element, create the view state
    5) Send HTML to Browser
  • C. 1) Evaluate constructors on controller and extensions
    2) If there's a <apex:form> element, create the view state
    3) Evaluate expressions, <apex:page> attribute actions, and other method calls (getters/setters) on main page
    4) Evaluate constructors, extensions, and expression on attribute definitions on any custom components present
    5) Send HTML to Browser

Answer: A

 

NEW QUESTION 42
A developer is inserting, updating, and deleting multiple lists of records in a Single transaction and wants to ensure that any error prevents all execution.
How should the developer implement error exception handling in their code to handle this?

  • A. Use a Try/Catch and use sObject.addError() on any failures.
  • B. Use a Try/Catch statement and handle DML cleanup in the catch statement.
  • C. Use Database methods to obtain lists of Database.SaveResults.
  • D. Use Database.setSavepoint() and Database.rollBack() with a Try/Catch statement.

Answer: D

 

NEW QUESTION 43
Choose the correct definition for <apex:pageMessage>

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

Answer: C

 

NEW QUESTION 44
A developer has written the following method:
static void processList(List<sobject> input){
Which code block can be used to call the method?

  • A. for Account ace : [SELECT Id, Name FROM Account])
  • B. processList ([FIND 'Acme" 'RETURNING Account])
  • C. processList([SELECT Id, Name FROM sObject WHERE Type = 'Account'])
  • D. processList (ace)

Answer: C

 

NEW QUESTION 45
ABC Company has an Apex process that makes multiple extensive database operation and web service callouts. The database processes and web services can take a length time to run and must be run sequentially.
How should the developer write this Apex code without running into governor limits and system limitations?

  • A. Use Limits class to stop entire process once governor limits are reached.
  • B. Use Apex Scheduler to scheduled each process.
  • C. Use multiple @future methods for each process and callout.
  • D. Use Queueable Apex to chain the jobs to run sequentially.

Answer: D

 

NEW QUESTION 46
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. SOQL could be avoided by creating a formula field for StageName in Account from the related Opportunity
  • B. The code will result in a System.LimitException : Too many script statements error
  • C. The code will result in a System.DmlException:Entity_is_Deleted error
  • D. The code will result in a System.LimitException: Apex CPU time limit exceeded error

Answer: D

 

NEW QUESTION 47
A developer needs to create a Lightning page for entering Order Information. An error message should be displayed if the zip code entered as part of the Order's shipping address is not numeric. What is a recommended way for the error message be displayed to the end user?

  • A. Use the apex:message tag to display errors.
  • B. Use the ui:outputText tag to display errors.
  • C. Use the aura:component tag to display errors.
  • D. Use the ui:inputDefaultError tag to display errors

Answer: D

 

NEW QUESTION 48
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 Strings+ 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 49
Choose the correct definition for <apex:actionPoller>.

  • A. Adds AJAX support to another component (e.g. onClick, onMouseUp, onFocus, etc.)
  • B. Allows for controller methods to be called directly from Javascript. Must be encapsulated in <apex:form> tags. Unlike actionSupport, these function<apex:actionPoller>s can be called directly from Javascript code
  • C. Signifies which components should be processed by the server when an AJAX request is generated
  • D. Can be associated with an AJAX request (actionFunction/actionSupport/actionPoller) and shows content conditionally depending on the status of the request (in progress/complete). Use the "id" field to specify name; use "status" field on related components to connect them
  • E. Sends an AJAX request according to the time interval you specify. If this ever gets re-rendered, it resets

Answer: E

 

NEW QUESTION 50
Just prior to a new deployment, the Salesforce Administrator who configured a new order fulfillment process in a developer sandbox suddenly left the company. The users had fully tested all of the changes in the sandbox and signed off on them.
Unfortunately, although a Change Set was started, it was not complete. A developer is brought in to help finish the deployment.
What should the developer do to identify the configuration changes that need to be moved into production?

  • A. Use the Metadata API and a supported development IDE to push all of the configuration from the sandbox into production to ensure no changes are lost.
  • B. Set up Continuous Integration and a Git repository to automatically merge all changes from the sandbox metadata with the production metadata.
  • C. Leverage the Setup Audit Trail to review the changes made by the departed Administrator and identify which changes should be added to the Change Set.
  • D. In Salesforce setup, look at the last modified date for every object to determine which should be added to the Change Set.

Answer: C

 

NEW QUESTION 51
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 52
A customer has a single Visualforce page that allows each user to input up to 1500 sales forecasts and instantly view pivoted forecast calculations. Users are complaining that the page is loading slowly, and they are seeing error messages regarding heap and view state limits. What are three recommendations to optimize page performance?

  • A. Use JavaScript Remoting instead of controller actions.
  • B. Create formula fields to compute pivoted forecast calculations.
  • C. Specify the list of sales forecasts as transient.
  • D. Implement pagination and reduce records per page.
  • E. Segregate calculation functionality from input functionality.

Answer: A,B,E

 

NEW QUESTION 53
A developer has written an After Update trigger on Account. A workflow rule and field update cause the trigger to repeatedly update the Account records.
How should the developer handle the recursive trigger?

  • A. Deactivate the trigger and move the logic into a Process or Flow
  • B. Use a global variable to prevent the trigger from executing more than once
  • C. Deactivate the workflow rule to prevent the field update from executing
  • D. Use a static variable to prevent the trigger from executing more than once

Answer: D

 

NEW QUESTION 54
A company has a Lightning Page with many Lightning Components, some that cache reference data. It is reported that the page does not always show the most current reference data. What can a developer use to analyze and diagnose the problem in the Lightning Page?

  • A. Salesforce Lightning Inspector Storage Tab
  • B. Salesforce Lightning Inspector Actions Tab
  • C. Salesforce Lightning Inspector Event Log Tab
  • D. Salesforce Lightning Inspector Transactions Tab

Answer: A

 

NEW QUESTION 55
The "action" attribute on <apex:page> is ONLY evaluated on which type of request?

  • A. Postback request
  • B. Get request

Answer: B

 

NEW QUESTION 56
How should a developer verify that a specific Account record is being tested in a test class for a visualforce controller?

  • A. Insert the Account into Salesforce, instantiate the page reference in the test class, then use System.setParentRecordId().get() to set the Account ID.
  • B. Instantiate the page reference in the test class, insert the Account in the test class, then use seeAHData-true to view the Account.
  • C. Insert the Account in the test class, instantiate the page reference in the test class, then use System.currentPageReference().getParameters{}.put() to set the Account ID.
  • D. Instantiate the page reference in the test class, insert the Account in the test class, then use System.setParentRecordld().get() to set the Account ID.

Answer: D

 

NEW QUESTION 57
......

Free PDII Exam Questions PDII Actual Free Exam Questions: https://www.lead2passexam.com/Salesforce/valid-PDII-exam-dumps.html

100% Free PDII Exam Dumps to Pass Exam Easily: https://drive.google.com/open?id=1NlQXs-pI7rplHp5caLixjwrDdmIfUoy2