Pass PDI Exam with Updated PDI Exam Dumps PDF 2022 [Q16-Q41]

Share

Pass PDI Exam with Updated PDI Exam Dumps PDF 2022

PDI Exam Dumps - Free Demo & 365 Day Updates


How much PDI Exam Cost

The price of the Salesforce PDI Exam is $200 USD.

 

NEW QUESTION 16
A developer creates a Workflow Rule declaratively that updates a field on an object. An Apex update trigger exists for that object. What happens when a user updates a record?

  • A. Both the Apex Trigger and Workflow Rule are fired only once.
  • B. No changes are made to the data.
  • C. The Apex Trigger is fired more than once.
  • D. The Workflow Rule is fired more than once.

Answer: C

 

NEW QUESTION 17
Which two SOSL searches will returns records matching search criteria contained in any of the searchable texts fields on an object? Choose 2 answers

  • A. [FIND 'Acme*' IN ALL FIELDS RETURNING Account,Opportunity];
  • B. [FIND 'Acme*' IN TEXT FIELDS RETURNING Account,Opportunity];
  • C. [FIND 'Acme*' IN ANY FIELDS RETURNING Account,Opportunity];
  • D. [FIND 'Acme*' RETURNING Account,Opportunity];

Answer: A,D

 

NEW QUESTION 18
A custom picklist field, Food_Preference__c, exist on a custom object. The picklist contains the following options: 'Vegan','Kosher','No Preference'. The developer must ensure a value is populated every time a record is created or updated. What is the most efficient way to ensure a value is selected every time a record is saved?

  • A. Set a validation rule to enforce a value is selected.
  • B. Mark the field as Required on the field definition.
  • C. Set "Use the first value in the list as the default value" as True.
  • D. Mark the field as Required on the object's page layout.

Answer: D

 

NEW QUESTION 19
A developer is tasked to perform a security review of the ContactSearch Apex class that exists in the system.
Whithin the class, the developer identifies the following method as a security threat: List<Contact> performSearch(String lastName){ return Database.query('Select Id, FirstName, LastName FROM Contact WHERE LastName Like %'+lastName+'%); } What are two ways the developer can update the method to prevent a SOQL injection attack? Choose 2 answers

  • A. Use the @Readonly annotation and the with sharing keyword on the class.
  • B. Use a regular expression on the parameter to remove special characters.
  • C. Use the escapeSingleQuote method to sanitize the parameter before its use.
  • D. Use variable binding and replace the dynamic query with a static SOQL.

Answer: A,B

 

NEW QUESTION 20
A developer is asked to create a Visualforce page that displays some Account fields as well as fields configured on the page layout for related Contacts.
How should the developer implement this request?

  • A. Create a controller extension.
  • B. Add a method to the standard controller.
  • C. Use the <apex:include> tag.
  • D. Use the <apex:relatedList> tag.

Answer: C

 

NEW QUESTION 21
A developer needs to write a method that searches for a phone number that could be on multiple object types.
Which method should the developer use to accomplish this task?

  • A. SOQL query on each object
  • B. SOQL Query that includes ALL ROWS
  • C. SOSL Query that includes ALL ROWS
  • D. SOSL query on each object

Answer: C

 

NEW QUESTION 22
A developer creates a new Visualforce page and Apex extension, and writes test classes that exercise 95% coverage of the new Apex extension.Change set deployment to production fails with the test coverage warning: "Average test coverage across all Apex classes and triggers is 74%, at least 75% test coverage is required."What can the developer do to successfully deploy the new Visualforce page and extension?

  • A. Select "Disable Parallel Apex Testing" to run all the tests.
  • B. Add test methods to existing test classes from previous deployments.
  • C. Create test classes to exercise the Visualforce page markup.
  • D. Select "Fast Deployment'' to bypass running all the tests.

Answer: B

 

NEW QUESTION 23
A developer needs to create records for the object Property__c. The developer creates the following code block:List propertiesToCreate = helperClass.createProperties();try { // line 3 } catch (Exception exp ) {
//exception
handling }Which line of code would the developer insert at line 3 to ensure that at least some records are created, even if a few records have errors and fail to be created?

  • A. Database.insert(propertiesToCreate, false);
  • B. insert propertiesToCreate;
  • C. Database.insert(propertiesToCreate, System.ALLOW_PARTIAL);
  • D. Database.insert(propertiesToCreate);

Answer: A

 

NEW QUESTION 24
which statement is true regarding execution order when triggers are associated to the same object and event?

  • A. Triggers are executed alphabetically by trigger name.
  • B. Trigger execution order cannot be guaranteed.
  • C. executed In the order they are modified.
  • D. Triggers are executed in the order they are created.

Answer: B

 

NEW QUESTION 25
In a single record, a user selects multiple values from a multi-select picklist. How are the selected values represented in Apex?

  • A. As a String with each value separated by a semicolon
  • B. As a String with each value separated by a comma
  • C. As a List with each value as an element in the list Previous
  • D. As a Set with each value as an element in the set

Answer: A

 

NEW QUESTION 26
Which two statements are acceptable for a developer to use inside procedural loops?

  • A. Account a = [SELECT id, Name FROM account WHERE id = : con.AccountId LIMIT 1];
  • B. ContactList.remove(i);
  • C. Delete contactList;
  • D. Contact con = new Contact();

Answer: B,D

 

NEW QUESTION 27
Which action can a developer take to reduce the execution time of the following code? List<account> allaccounts = [select id from account]; list<account> allcontacts = [select id, accountid from contact]; for (account a :allaccounts){ for (contact c:allcontacts){ if(c.accountid = a.id){ //do work } } }

  • A. Use a map <id,contact> for allaccounts
  • B. Put the account loop inside the contact loop
  • C. Add a group by clause to the contact SOQL
  • D. Create an apex helper class for the SOQL

Answer: A

 

NEW QUESTION 28
A developer has created a Visualforce Page and Apex Controller that uses the With Sharing keyword. The page will be used of by Sales Managers and should only display Accounts owned by Sales Representatives who report to the running Sales Manager. The organization-wide sharing for Accounts is set to Private. Which additional set of stops should the developer take?

  • A. Create two Profiles, one Permission Set, and one Role.
  • B. Create one Profile, one Permission Set, and two Roles.
  • C. Create one Profile, two Permission Sets, and one Role.
  • D. Create one Profile, one Permission Set, and one Role.

Answer: B

 

NEW QUESTION 29
Which scenario is valid for execution by unit tests?

  • A. Generate a Visualforce PDF with geccontentAsPDF ().
  • B. Load data from a remote site with a callout.
    5. Set the created date of a record using a system method.
    Cc: Execute anonymous Apex as a different user.

Answer: A

 

NEW QUESTION 30
A developer creates a custom controller and a custom Visualforce page by using the code block below:
public class MyController {
public String myString {
get {
if (myString == null) { myString = 'a';
}
return myString;
} private set; } public string getMyString (){
return 'getMyString';
} public string getStringMethod () {
if (myString == null) {
myString = 'b';
} return myString;
}
} <apex:page controller = "MyController"> {!StringMethod}, {!myString}, {!myString} </apex:page> What can the user expect to see when accessing the custom page?

  • A. A, b, getMyString
  • B. A, a, a
  • C. B, b, b
  • D. B, a, getMyString

Answer: B

 

NEW QUESTION 31
A developer is creating a page that allows users to create multiple Opportunities. The developer is asked to verify the current user's default } | Opportunity record type, and set certain default values based on the record type before inserting the record. i, J Calculator How can the developer find the current user's default record type? ns

  • A. Use the Schema.userlnfo.Opportunity.getDefaultRecordType() method. < Create the opportunity and check the opportunity.recordType before inserting, which will have the record ID of the current Dal
  • B. o Use Opportunity. SObjectType.getDescribe().getRecordTypelnfos() to get a list of record types, and iterate through them until [ J isDefaultRecordTypeMapping() is true. Pencil & Paper |
  • C. Query the Profile where the ID equals userInfo.getProfileID() and then use the profile.Opportunity.getDefaultRecordType() | | method. ] |

Answer: B

Explanation:
user's default record type.

 

NEW QUESTION 32
Refer to the following code that runs in an Execute Anonymous block:

  • A. The total number of records processed as a result of DML statements will be exceeded.
  • B. In an environment where the full result set is returned, what is a possible outcome of this code?
  • C. The transaction will succeed and the first ten thousand records will be committed to the database.
  • D. The total number of DML statements will be exceeded.

Answer: B

 

NEW QUESTION 33
What is the result of the following code block ?
Integer x = 1;Integer Y = 0;While(x < 10){Y++;}

  • A. Y = 9
  • B. An error occurs
  • C. X = 0
  • D. Y = 10

Answer: B

 

NEW QUESTION 34
What is an important consideration when developing in a multi-tenant environment?

  • A. Org-wide data security determines whether other tenants can see data in multiple orgs on the same instance.
  • B. Governor limits prevent tenants from impacting performance in multiple orgs on the same instance.
  • C. Unique domain names take the place of namespaces for code developed for multiple orgs on multiple instances.
  • D. Polyglot persistence provides support for a global, multilingual user base in multiple orgs on multiple instances.

Answer: B

 

NEW QUESTION 35
From which two locations can a developer determine the overall code coverage for a sandbox? Choose two answers

  • A. The Test Tab of the Developer Console
  • B. The Apex classes setup page
  • C. The Apex Test Execution page
  • D. The Test Suite Run panel the Developer Console

Answer: A,B

 

NEW QUESTION 36
A developer identifies the following triggers on the Expense_c object:
DeleteExpense,
applyDefaultstoexpense
validateexpenseupdate;
The triggers process before delete, before insert, and before update events respectively.
Which two techniques should the developer implement to ensure trigger best practice are followed?

  • A. Unify all three triggers in a single trigger on the Expense__c object that includes all events.
  • B. Unify the before insert and before update triggers and use Process Builder for the delete action.
  • C. Maintain all three triggers on the Expense__c object, but move the Apex logic out for the trigger definition.
  • D. Create helper classes to execute the appropriate logic when a record is saved.

Answer: A,D

 

NEW QUESTION 37
A developer executes the following query in Apex to retrieve a list of contacts for each account:
List<account> accounts = [Select ID, Name, (Select ID, Name from Contacts) from Account] ; Which two exceptions may occur when it executes? (Choose two.)

  • A. SOQL query row limit exception due to the number of accounts.
  • B. CPU limit exception due to the complexity of the query.
  • C. SOQL query limit exception due to the number of contacts.
  • D. SOQL query row limit exception due to the number of contacts.

Answer: A,C

 

NEW QUESTION 38
A developer must create an Apex class, contactcontroller, that a Lightning component can use to search for Contact records. User of the Lightning component should only be able to search Contact records to which they have access. Which two will restrict the records correctly?

  • A. public class ContactController
  • B. public without sharing class ContactController
  • C. public with sharing class ContactController
  • D. public inherited sharing class ContactController

Answer: C,D

 

NEW QUESTION 39
Where are two locations a developer can look to find information about the status of asynchronous or future cals? Choose 2 answers

  • A. Apex Jobs
  • B. Paused Flow Interviews component
  • C. Time-Based Workflow Monitor
  • D. Apex Flex Queue

Answer: A,D

 

NEW QUESTION 40
Which data type or collection of data types can SOQL statements populate or evaluate to? (Choose 3)

  • A. An integer
  • B. A list of sObjects
  • C. A Boolean
  • D. A single sObject
  • E. A string

Answer: A,B,D

 

NEW QUESTION 41
......

PDI Dumps - Pass Your Certification Exam: https://www.realexamfree.com/PDI-real-exam-dumps.html

Free Sales Ending Soon - Use Real  PDI PDF Questions: https://drive.google.com/open?id=1jy3TSb7NoqUY8696U5bOGv_fAg9yqD5p