2023 Best PDI Exam Preparation Material with New Dumps Questions [Q78-Q103]

Share

2023 Best PDI Exam Preparation Material with New Dumps Questions

Free PDI Exam Files Verified & Correct Answers Downloaded Instantly

NEW QUESTION 78
What are two considerations for custom Apex Exception classes? Choose 2 answers.

  • A. Custom Exception classes must extend the base Exception class.
  • B. Custom Exception class names must end with the word 'Exception'.
  • C. Constructor for custom Exceptions can only accept string values as arguments.
  • D. Custom Exceptions cannot be extended by other Exception classes.

Answer: A,B

 

NEW QUESTION 79
A reviewer is required to enter a reason in the comments field only when a candidate is recommended to be hired. Which action can a developer take to enforce this requirement?

  • A. Create a formula field.
  • B. Create a required Visualforce component.
  • C. Create a required comments field.
  • D. Create a validation rule.

Answer: D

 

NEW QUESTION 80
In terms of the MVC paradigm, what are two advantages of implementing the layer of a Salesforce application using Aura Component-based development over Visualforce? Choose 2 answers

  • A. Automatic code generation
  • B. Rich component ecosystem (Missed)
  • C. Self-contained and reusable units of an application (Missed)
  • D. Server-side run-time debugging

Answer: B,C

 

NEW QUESTION 81
What is a capability of a StandardSetController?Choose 2 answers

  • A. It allows pages to perform mass updates of records
  • B. It extends the functionality of a standard or custom controller
  • C. It enforces field-level security when reading large record sets
  • D. It allows pages to perform pagination with large record sets

Answer: A,D

 

NEW QUESTION 82
A developer needs to know if all tests currently pass in a Salesforce environment. Which feature can the developer use? (Choose 2)

  • A. Salesforce UI Apex Test Execution
  • B. Workbench Metadata Retrieval
  • C. Developer Console
  • D. ANT Migration Tool

Answer: A,C

 

NEW QUESTION 83
Considering the following code snippet:

When the code executes a DML exception is thrown.
How should the developer modify the code to ensure exceptions are handled gracefully?

  • A. Remove null items from the list if Accounts.
  • B. Implement a try/catch block for the DML.
  • C. Implement Change Data Capture
  • D. Implement the upsert DML statement.

Answer: B

 

NEW QUESTION 84
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. Mark the field as Required on the field definition.
  • B. Set "Use the first value in the list as the default value" as True.
  • C. Set a validation rule to enforce a value is selected.
  • D. Mark the field as Required on the object's page layout.

Answer: A

 

NEW QUESTION 85
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. Mark the field as Required on the field definition.
  • B. Set "Use the first value in the list as the default value" as True.
  • C. Set a validation rule to enforce a value is selected.
  • D. Mark the field as Required on the object's page layout.

Answer: A

 

NEW QUESTION 86
Which standard field needs to be populated when a developer inserts new Contact records programmatically?

  • A. FirstName
  • B. LastName
  • C. Name
  • D. Accountld

Answer: B

 

NEW QUESTION 87
A developer created a Visualforce page and custom controller to display the account type field as shown below. Custom controller code: public class customCtrlr{ private Account theAccount; public String actType; public customCtrlr() { theAccount = [SELECT Id, Type FROM Account WHERE Id = :apexPages.currentPage().getParameters().get('id')]; actType = theAccount.Type; } } Visualforce page snippet: The Account Type is {!actType} The value of the account type field is not being displayed correctly on the page. Assuming the custom controller is property referenced on the Visualforce page, what should the developer do to correct the problem?

  • A. Change theAccount attribute to public.
  • B. Add with sharing to the custom controller.
    https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_custom.htm
  • C. Convert theAccount.Type to a String.
  • D. Add a getter method for the actType attribute.

Answer: D

 

NEW QUESTION 88
Universal Containers wants Opportunities to no longer be editable when reaching the Closed/Won stage.
How should a developer accomplish this?

  • A. Use a validation rule.
  • B. Use the Process Automation settings.
  • C. Use Flow Builder.
  • D. Mark fields as read-only on the page layout.

Answer: A

 

NEW QUESTION 89
A developer writes the following code:

What is the result of the debug statement?

  • A. 1, 150
  • B. 1, 100
  • C. 2, 200
  • D. 2, 150

Answer: D

 

NEW QUESTION 90
Universal Containers wants a list button to display aVisualforce page that allows users to edit multiple records.
which Visualforce feature supports this requirement?

  • A. Custom controller
  • B. RecordSetVar page attribute
  • C. <apex:listButton> tag
  • D. Controller extension

Answer: B

 

NEW QUESTION 91
Which two statement can a developer use to throw a custom exception of type MissingFieldValueException?Choose 2 answers

  • A. Throw (MissingFieldValueException,'Problem occurred');
  • B. Throw Exception(new MissingFieldValueException());
  • C. Throw new MissingFieldValueException();
  • D. Throw new MissingFieldValueException('Problem occurred');

Answer: C,D

 

NEW QUESTION 92
An Apex method, getAccounts, that returns a List of Accounts given a searchTerm, is available for Lightning Web components to use.
What is the correct definition of a Lightning Web component property that uses the getAccounts method?

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

Answer: C

 

NEW QUESTION 93
What declarative method helps ensure quality data? Choose 3 answers

  • A. Page layouts
  • B. Workflow alerts
  • C. Exception handling
  • D. Lookup filters
  • E. Validation rules

Answer: A,D,E

 

NEW QUESTION 94
A business has a proprietary Order Management System (OMS) that creates orders from their website and ... the order. When the order is created in the OMS, an integration also creates an order record in Salesforce ... relates it to the contact as identified by the email on the order. As the order goes through different stages in OMS, the integration also updates it in Salesforce.
It is notified that each update from the OMS creates a new order record in Salesforce.
Which two actions prevent the duplicate order records from being created in Salesforce?
Choose 2 answers

  • A. Use the order number from the OMS as an external ID.
  • B. Use the email on the contact record as an external ID.
  • C. Write a before trigger on the order object to delete any duplicates.
  • D. Ensure that the order number in the OMS is unique.

Answer: C,D

 

NEW QUESTION 95
What are two use cases for executing Anonymous Apex code? Choose 2 answers

  • A. To add unit test code coverage to an org
  • B. To delete 15,000 inactive Accounts In a single transaction after a deployment
  • C. To schedule an Apex class to run periodically
  • D. To run a batch Apex class to update all Contacts

Answer: C,D

 

NEW QUESTION 96
What are three ways for 2 developer to execute tests in an org? Choose 3 answers

  • A. Bulk API
  • B. Tooling API
  • C. SalesforceDX
  • D. Setup Menu
  • E. Metadata APT

Answer: B,C,D

 

NEW QUESTION 97
What is a capability of the Developer Console?

  • A. Execute Anonymous Apex code, Run REST API, create/Edit code.
  • B. Execute Anonymous Apex code, Create/Edit code, Deploy code changes.
  • C. Execute Anonymous Apex code, Create/Edit code, view Debug Logs.
  • D. Execute Anonymous Apex code, Run REST API, deploy code changes.

Answer: C

 

NEW QUESTION 98
Get Cloudy Consulting (GCC) has a multitude of servers that host its customers' websites. GCC wants to provide a servers status page that is always on display in its call center. It should update in real time with any changes made to any servers. To accommodate this on the server side, a developer created a server Update platform event.
The developer is working on a Lightning web component to display the information.

  • A. import ( subscribe, unsubscribe, onError ) from 'lightning/empApi '
  • B. import ( subscribe, unsubscribe, onError ) from 'lightning/MessageChannel'
  • C. import ( subscribe, unsubscribe, onError ) from 'lightning/pubsub'
  • D. import ( subscribe, unsubscribe, onError ) from 'lightning/ServerUpdate'

Answer: A

 

NEW QUESTION 99
A developer must provide a custom user interface when users edit a Contact. Users must be able to use the interface in Salesforce Classic and Lightning Experience.
What should the developer do to provide the custom user interface?

  • A. Override the Contact's Edit button with a Lightning page in Salesforce Classic and a Visualforce page in Lightning Experience.
  • B. Override the Contact's Edit button with a Visualforce page in Salesforce Classic and a Lightning component in Lightning Experience.
  • C. Override the Contact's Edit button with a Lightning component in Salesforce Classic and a Lightning component in Lightning Experience.
  • D. Override the Contact's Edit button with a Visualforce page in Salesforce Classic and a Lightning page inLightning Experience.

Answer: B

 

NEW QUESTION 100
A developer executes the following code in the Developer Console:
List<Account> fList = new List <Account> ();For(integer i= 1; I <= 200; i++){fList.add(new Account ( Name
= 'Universal Account ' + i));}Insert fList;List <Account> sList = new List<Account>();For (integer I = 201; I
<
20000; i ++){sList.add(new Account (Name = 'Universal Account ' + i));}Insert sList;How many accounts are created in the Salesforce organization ?

  • A. 0
  • B. 1
  • C. 2
  • D. 3

Answer: B

 

NEW QUESTION 101
To which data type in Apex a currency field automatically assigned?

  • A. Decimal
  • B. Currency
  • C. Integer
  • D. Double

Answer: A

 

NEW QUESTION 102
Given the code below:

What should a developer do to correct the code so that there is no chance of hitting a governor limit?

  • A. Rework the code and eliminate the for loop.
  • B. Add a WHERE clause to the first SELECT SOQL statement.
  • C. Add a LIMIT clause to the first SELECT SOQL statement.
  • D. combine the two SELECT statements into a single SOQL statement.

Answer: C

 

NEW QUESTION 103
......

Instant Download PDI Dumps Q&As Provide PDF&Test Engine: https://www.exams4sures.com/Salesforce/PDI-practice-exam-dumps.html

Fast Exam Updates PDI dumps with PDF Test Engine Practice: https://drive.google.com/open?id=1acl7cm9-BhYacnKbVaDm9G0bCcc3_cvr