100% Pass Top-selling PDII Exams - New 2021 Salesforce Pratice Exam
Salesforce Developers Dumps PDII Exam for Full Questions - Exam Study Guide
NEW QUESTION 58
Which interface needs to be implemented by a Lightning Component so that it may be displayed in modal dialog by clicking a button on a Lightning Record page?
- A. Lightning:editAction
- B. Force: lightningQuickAction
- C. Fightning:quickAction
- D. Force:lightningEditAction
Answer: B
NEW QUESTION 59
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 60
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. Create formula fields to compute pivoted forecast calculations.
- B. Use JavaScript Remoting instead of controller actions.
- C. Specify the list of sales forecasts as transient.
- D. Segregate calculation functionality from input functionality.
- E. Implement pagination and reduce records per page.
Answer: A,B,E
NEW QUESTION 61
A developer is trying to decide between creating a Visualforce component or a Lightning component for a custom screen. Which functionality consideration impacts the final decision?
- A. Does the screen need to be accessible from the Lightning Experience UI?
- B. Will the screen be accessed via a mobile app?
- C. Does the screen need to be rendered as a PDF?
- D. Will the screen make use of a JavaScript framework?
Answer: A
NEW QUESTION 62
In an organization that has multi-currency enabled, a developer is tasked with building a Lighting Component that displays the top ten Opportunities most recently access by the logged in user. The developer must ensure the Amount and LastModifiedDate field values are displayed according to the user's locale.
What is the most effective approach to ensure values displayed respect the users locale settings?
- A. Use the FOR VIEW clause in the SOQL Query.
- B. Use the FORMAT() function in the SOQL query.
- C. Use REGEX expressions to format the values retrieved via SOQL.
- D. Use a wrapper class to format the values retrieved via SOQL.
Answer: A
NEW QUESTION 63
A company has a web page that needs to get Account record information, given its Salesforce record ID, from JavaScript on the page and then display it. Which method of integration is optimal?
- A. Apex SOAP Web Service
- B. Apex REST Web Service
- C. REST API
- D. SOAP API
Answer: B
NEW QUESTION 64
A developer is tasked with ensuring that email addresses entered into the system for Contacts and for a Custom Object called Survey_Response_ _c do not belong to a list of blocked domains. The list of blocked domains will be stored in a custom object for ease of maintenance by users. Note that the Survey_Response_ _c object is populated via a custom Visualforce page.
What is the optimal way to implement this?
- A. Implement the logic in a Validation Rule on the Contact and a Validation Rule on the Survey_Response_ _c object
- B. Implement the logic in the Custom Visualforce page controller and call that method from an Apex trigger on Contact
- C. Implement the logic in a helper class that is called by an Apex trigger on Contact and from the Custom Visualforce page controller
- D. Implement the logic in an Apex trigger on Contact and also implement the logic within the Custom Visualforce page controller
Answer: C
NEW QUESTION 65
A developer writes the following Apex trigger so that when a Case is closed, a single Survey record is created for that Case. The issue is that multiple Survey-c records are being created per Case. trigger CaseTrigger on Case (after insert, after update) { List<Survey__c> createSurveys = new List<Survey__c>(); for (Case c :
trigger.new) { if (c.IsClosed && (trigger.isInsert ll trigger.isUpdate && trigger.oldMap.get(c.Id).IsClosed == false)) { createSurveys.add(new Survey__c(Case__c = c.Id)); insert createSurveys; } } What could be the cause of this issue?
- A. A user is editing the record multiple times.
- B. A user is creating the record as Closed
- C. A workflow rule is firing with a Create Task action.
- D. A workflow rule is firing with a Field Update action.
Answer: A
NEW QUESTION 66
What is a limitation of a "getxxx" method (for example, getName) in a custom Visualforce controller?
- A. The method cannot use SOSL queries.
- B. The method cannot use DML operations.
- C. The method cannot return Apex classes.
- D. The method cannot return SObjects.
Answer: B
NEW QUESTION 67
The test method above calls an @future method that increments the Number_of_Times_Viewed__c value. The assertion is failing because the Number_of_Times_Viewed__c equals 0. What is the optimal way to fix this?
- A. Add Test.startTest() before and Test.stopTest() after insert acct
- B. Change the assertion to System.assertEquals(0, acctAfter.Number_Of_Times_Viewed__c).
- C. Change the initialization to acct.Number_Of_Times_Viewed__c = 1.
- D. Add Test.startTest() before and Test.stopTest() after AuditUtil.incrementViewed.
Answer: D
NEW QUESTION 68
If a developer wanted to display error messages with the standard Salesforce Ul styling, what would they use?
- A. <apex:error>
- B. <apex:outputText>
- C. <apex:pageMessages>
- D. <apex:message>
Answer: C
NEW QUESTION 69
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 Apex Scheduler to scheduled each process.
- B. Use multiple @future methods for each process and callout.
- C. Use Queueable Apex to chain the jobs to run sequentially.
- D. Use Limits class to stop entire process once governor limits are reached.
Answer: C
NEW QUESTION 70
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: C
NEW QUESTION 71
A developer is debugging an Apex-based order creation process that has a requirement to have three savepoints, SP1, SP2, and SP3 (created in order), before the final execution of the process.
During the final execution process, the developer has a routine to roll back to SP1 for a given condition. Once the condition is fixed, the code then calls a roll back to SP3 to continue with final execution. However, when the roll, back to SP3 is called, a runtime error occurs.
Why does the developer receive a runtime error?
- A. The developer has too many DML statements between the savepoints.
- B. SP3 became invalid when SP1 was rolled back.
- C. The developer should have called SP2 before calling SP3.
- D. The developer used too many savepoints in one trigger session.
Answer: B
NEW QUESTION 72
Choose the correct definition for <apex:actionFunction>.
- A. Sends an AJAX request according to the time interval you specify. If this ever gets re-rendered, it resets
- B. Adds AJAX support to another component (e.g. onClick, onMouseUp, onFocus, etc.)
- C. 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
- D. Signifies which components should be processed by the server when an AJAX request is generated
- E. 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
Answer: C
NEW QUESTION 73
A developer has a page with two extensions overriding the Standard controller for Case.
What will happen when a user clicks the command button?
- A. Save from Case Standard Controller will be executed
- B. Save from CaseExtensionTwo will be executed
- C. Save from CaseExtensionOne will be executed
- D. All of the three Save methods will be executed
Answer: C
NEW QUESTION 74
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 75
A company processes Orders within their Salesforce instance. When an Order's status changes to 'Paid' it must notify the company's order management system (OMS). The OMS exposes SOAP web service endpoints to listen for when to retrieve the data from Salesforce.
What is the optimal method to implement this?
- A. Generate the Partner WSDL and use it to make a callout to the OMS.
- B. Create an Apex trigger and make a callout to the OMS from the trigger.
- C. Create an Outbound Message that contains the session ID and send it to the OMS.
- D. Generate the Enterprise WSDL and use it to make a callout to the OMS.
Answer: D
Explanation:
Explanation/Reference:
NEW QUESTION 76
A developer is asked to build a solution that will automatically send an email to the Customer when an Opportunity stage changes. The solution must scale to allow for 10,000 emails per day. The criteria to send the email should be evaluated after all Workflow Rules have fired. What is the optimal way to accomplish this?
- A. Use a Workflow Email Alert.
- B. Use an Email Alert with Process Builder.
- C. Usea MassEmailMessage() with an Apex Trigger.
- D. Use a SingleEmailMessage() with an Apex Trigger.
Answer: B
NEW QUESTION 77
......
Authentic Best resources for PDII Online Practice Exam: https://www.passcollection.com/PDII_real-exams.html
PDII Test Engine Practice Exam: https://drive.google.com/open?id=13hbrNgkx4AFCoeqn-LH3yIFr_vtSQNdY

