[Sep 08, 2021] PDII Ultimate Study Guide - TopExamCollection [Q40-Q65]

Share

[Sep 08, 2021] PDII Ultimate Study Guide -  TopExamCollection

Ultimate Guide to Prepare PDII Certification Exam for Salesforce Developers in 2021

NEW QUESTION 40
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:
Explanation
Explanation/Reference:
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 41
A company wants to create a dynamic survey that navigates users through a different series of questions based on their previous responses.
What is the recommended solution to meet this requirement?

  • A. Dynamic Record Choice
  • B. Lightning Process Builder
  • C. Visualforce and Apex
  • D. Custom Lightning Application

Answer: A

 

NEW QUESTION 42
Customer billing data must be added and updated into Salesforce from a remote system on a weekly basis.
Additionally, customer activity information must be extracted from Salesforce and put it into an on-premises data warehouse on a weekly basis.
Which approach should be used to import data into Salesforce and export data out of Salesforce, taking into consideration that these imports and exports can interfere with end-user operations during business hours and involve large amounts of data?

  • A. Replication via third-party ETL to push data into Salesforce and pull data out in batches
  • B. Batch Apex, where Salesforce pushes data to and pulls data from the remote systems
  • C. Salesforce Connect to push data to and pull data from the remote systems
  • D. Call-in directly from each remote system to Salesforce APIs to push and pull the data

Answer: A

 

NEW QUESTION 43
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 44
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

 

NEW QUESTION 45
The use of the transient keyword In Visualforce Page Controllers helps with which common performance issued?

  • A. Improves Page Transfers
  • B. Reduces View State
  • C. Reduces Load Times
  • D. Improves Query Performance

Answer: B

 

NEW QUESTION 46
The test method above tests an Apex trigger that the developer knows will make a lot of queries when a lot of Account are simultaneously updated to be customer.
The test method fails at the Line 20 because of too many SOQL queries
What is the correct way to fix this?

The test method above tests an Apex trigger that the developer knows will make a lot of queries when a lot of Accounts are simultaneously updated to be customers.
The test method fails at the Line 20 because of too many SOQL queries.
What is the correct way to fix this?

  • A. Change the DataFactory class to create fewer Accounts so that the number of queries in the trigger is reduced.
  • B. Add TesLstartTest() before and Test.stop Test() after both Line 7 of the code and Line 20 of the code.
  • C. Add TeststartTest() before Line 18 of the code and add Test.stopTest() after line 18 of the code.
  • D. Replace most of the Apex Trigger with Process Builder processes to reduce the number of queries in the trigger.

Answer: B

 

NEW QUESTION 47
Which of the following exceptions cannot be caught and will force an error? (Choose three.)

  • A. AssertException
  • B. DMLException
  • C. LimitException
  • D. License exceptions
  • E. SObjectExceptions
  • F. ListException

Answer: A,C,D

Explanation:
SObjectException occurs when accessing a field not queried, or you try to change a field during the wrong dml statement (i.e. an edit-only field being set on insert) Custom exceptions must extend the "Exception" class

 

NEW QUESTION 48
What is the transaction limit for the number of records using QueryLocator?

  • A. 50,000
  • B. 50,000,000
  • C. There is no limit
  • D. 100,000
  • E. 5,000,000

Answer: B

 

NEW QUESTION 49
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. Account a = remote.getAccount ();
    System.assertEquals( 'TestAccount', a.Name );
    Account a = MyRemoter.getAccount('TestAccount');
  • B. Account a = remote.getAccount('TestAccount');
    System.assertEquals( 'TestAccount', a.Name );
    MyRemoter remote = new MyRemoter('TestAccount');
  • C. System.assertEquals( 'TestAccount', a.Name );
    MyRemoter remote = new MyRemoter();
  • D. System.assertEquals( 'TestAccount', a.Name );

Answer: D

 

NEW QUESTION 50
Given a list of Opportunity records named opportunityList, which code snippet is best for querying all Contacts of the Opportunity's Account?
List <Contact> contactList = new List <Contact>();

  • A. for ( Contact c : [SELECT Id FROM Contact WHERE AccountId IN
    :opportunityList.AccountId] ){
    contactList.add(c);
    }
  • B. Set <Id> accountIds = new Set <Id> ();
    for(Opportunity o : opportunityList){
    accountIds.add(o.AccountId);
    }
    for(Account a : [SELECT Id, (SELECT Id FROM Contacts) FROM Account WHERE Id IN
    :accountIds]){
    contactList.addAll(a.Contacts);
    }
    List <Contact> contactList = new List <Contact>();
  • C. for(Opportunity o : opportunityList){
    Account a = [SELECT Id, (SELECT Id FROM Contacts) FROM Account WHERE Id
    :o.AccountId]
    contactList.addAll(a.Contacts);
    )
    List <Contact> contactList = new List <Contact>();
  • D. Set <Id> accountIds = new Set <Id> ();
    for (Opportunity o : opportunityList){
    contactIds.add(o.ContactId);
    }
    for(Contact c : [SELECT Id FROM Contact WHERE Id IN :contactIds]){
    contactList.add(c);
    }
    List <Contact> contactList = new List <Contact>();

Answer: B

 

NEW QUESTION 51
During the order of execution of a Visualforce page GET request, what happens after this step: Evaluate constructors on controllers and extensions?

  • A. Create view state if < apex: form> exists.
  • B. Send the HTML response to the browser.
  • C. Evaluate constructors and expressions on custom components.
  • D. Evaluate expressions, action attributes, and method calls.

Answer: C

 

NEW QUESTION 52
A custom Visualforce controller calls the ApexPages.addMessage() method, but no messages are rendering on the page. Which component should be added to the Visualforce page to display the message?
A)

B)

C)

D)

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

Answer: B

 

NEW QUESTION 53
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 54
The "Webservice" keyword...

  • A. All of the above
  • B. Used for any member variables included
  • C. Method must be static, and class must be global
  • D. Can be used on all classes

Answer: A

 

NEW QUESTION 55
A developer is experiencing issues with a Lightning web component. The component must surface information about Opportunity owned by the currently logged-in user.
When the component is rendered, the following message is displayed: ''Error retrieving data'' Which modification should be implemented to the Apex class to overcome the issue?

  • A. Use the Continuation=true attribute in the Apex method.
  • B. Ensure the OWD for the Opportunity object is public.
  • C. Edit the code to use the without sharing keyword in the Apex class.
  • D. Use the Cacheable=True attribute in the Apex method.

Answer: D

 

NEW QUESTION 56
A company has a custom object. Request__c. that has a field, Completed__c. and a Lookup to Opportunity, Opportunity__c.
Which SOQL query will get a unique list of all of the Opportunity records that have a Completed Request?

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

Answer: D

 

NEW QUESTION 57
What should be added to the setup, in the location indicated, for the unit test above to create the controller extension for the test?
A)

B)

C)

D)

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

Answer: B

 

NEW QUESTION 58
Universal Containers (UC) wants to develop a customer community to help their customers log issues with their containers. The community needs to function for their German- and Spanish-speaking customers also.
UC heard that it's easy to create an international community using Salesforce, and hired a developer to build out the site.
What should the developer use to ensure the site is multilingual?

  • A. Use Custom Metadata to translate custom picklist values.
  • B. Use Custom Objects to translate custom picklist values.
  • C. Use Custom Settings to ensure custom messages are translated properly.
  • D. Use Custom Labels to ensure custom messages are translated property.

Answer: D

 

NEW QUESTION 59
Which statement is considered a best practice for writing bulk safe Apex Triggers?

  • A. Add records to collections and perform DML operations against these collections.
  • B. Add LIMIT 50000 to every SOQL statement
  • C. Perform all DML operations from within a Future Method.
  • D. Instead of DML statements, use the Database methods with allOrNone set to False.

Answer: A

 

NEW QUESTION 60
messages are rendering on the page. Which component should be added to the Visualforce page to display the message?

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

Answer: B

 

NEW QUESTION 61
Given a list of Opportunity records named opportunityList, which code snippet is best for querying all Contacts of the Opportunity's Account?
A)

B)

C)

D)

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

Answer: A

 

NEW QUESTION 62
Which statement is true regarding both Flow and Lightning Process? (Choose two.)

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

Answer: A,D

 

NEW QUESTION 63
Consider the following code snippet:

A developer needs to built an interactive Aura component that responds to the user's input by hiding or showing sections according the user preferences.
What are two best practices the developer can implement to hide or show the powerVserView and s-rar.daraVserView inner components, based on the value of the attribute isPowexUser?
Choose 2 answers
A)

B)

C)

D)

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

Answer: B

 

NEW QUESTION 64
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. Add Test.startTest() before and Test.stopTest() after AuditUtil.incrementViewed.
  • D. Change the initialization to acct.Number_Of_Times_Viewed__c = 1.

Answer: D

 

NEW QUESTION 65
......

Salesforce Developers Fundamentals-PDII Exam-Practice-Dumps: https://www.topexamcollection.com/PDII-vce-collection.html

Use Real PDII Dumps - Salesforce Correct Answers: https://drive.google.com/open?id=1gEj4cza84WuoQGKx9VA5KL6qmJuIvMuj