Labour Day - Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: dpm65

PDII Salesforce Certified Platform Developer II (SP24) Questions and Answers

Questions 4

Universal Containers uses a custom Lightning page to provide a mechanism to perform a step-by-step wizard search for Accounts. One of the steps in the wizard is to allow the user to input text into a text field, ERF Number_c, that is then used in a query to find matching Accounts.

PDII Question 4

Which step should be taken to resolve the issue?

Options:

A.

Perform the SOQL query as part of a for loop.

B.

Mark the ERP_Numker = field as an external 10.

C.

Mark the ERP_Number__ c field as required.

D.

Move the SO0L query to within an asynchronous process.

Buy Now
Questions 5

Universal Containers allows customers to log into a Salesforce Community and update their orders via a custom Visualforce page. Universal Containers’ sales representatives can edit the orders on the same Visualforce page.

What should a developer use in an Apex test class to test that record sharing is enforced on the Visualforce page?

Options:

A.

use System. profiles=() to test as a sales rep and a community user.

B.

use System. profiles() to test as an administrator and a community user.

C.

use System. profiles1h=() to test as a sales rep and a community user.

D.

use System. runsAs () to test as an administrator and a community user.

Buy Now
Questions 6

A company has a native iOS order placement app that needs to connect to Salesforce to retrieve consolidated information from many different objects in a

JSON format.

Which is the optimal method to implement this in Salesforce?

Options:

A.

Apex REST web service

B.

Apex SOAP web service

C.

Apex SOAP callout

D.

Apex REST callout

Buy Now
Questions 7

Universal Charities (UC) uses Salesforce to collect electronic donations in the form of credit card deductions from individuals and corporations.

When a customer service agent enters the credit card information, it must be sent

to 8 3rd-party payment processor for the donation to be processed, UC uses one

payment processor for individuals and a different one for corporations.

What should a developer use to store the payment processor settings for the

different payment processors, so that their system administrator can modify the

settings once they are deployed, if needed?

Options:

A.

Custom object

B.

Custom metadata

C.

Hierarchy custom setting

D.

List custom setting

Buy Now
Questions 8

A Visualforce page contains an industry select list and displays a table of Accounts that have a matching value in their Industry field.

PDII Question 8

When a user changes the value in the industry select list, the table of Accounts

should be automatically updated to show the Accounts associated with the selected

industry,

What is the optimal way to implement this?

Options:

A.

Add an within the .

B.

Add an within the .

C.

Add an within the .

D.

Add an within the .

Buy Now
Questions 9

A developer created a Lightning web component that uses a lightning-record-edit-form to collect information about Leads. Users complain that they only see one error message at a time about their input when trying to save a Lead record.

What is the recommended approach to perform validations on more than one field, and display multiple error messages simultaneously with minimal JavaScript intervention?

Options:

A.

Try/catch/finally block

B.

External JavaScript library

C.

Validation rules

D.

Apex trigger

Buy Now
Questions 10

A developer is building a Lightning web component that searches

for Contacts. The component must communicate the search

results to other unrelated Lightning web components, that are in

different DOM trees, when the search completes.

What should the developer do to implement the communication?

Options:

A.

Fire an application event.

B.

Publish an event on an event channel.

C.

Fire a custom component event.

D.

Publish a message on a message channel.

Buy Now
Questions 11

Instead of waiting to send emails to support personnel directly from the finish

method of a batch Apex process, Universal Containers wants to notify an external

system in the event that an unhandled exception occurs.

What is the appropriate publish/subscribe logic to meet this requirement?

Options:

A.

Publish the error event using the Eventbus. publish () method.

B.

No publishing is necessary. Have the external system subscribe to the BatchapexErrorEvent.

C.

Publish the error event using the addError method.

D.

Publish the error event with a Flow.

Buy Now
Questions 12

A company notices that their unit tests in a test class with many methods to create many records for prerequisite reference data are slow.

What can a developer to do address the issue?

Options:

A.

Turn off triggers, flows, and validations when running tests.

B.

Move the prerequisite reference data setup to a TestDataFactory and call that from each test method,

C.

Move the prerequisite reference data setup to a @testSetup method in the test class.

D.

Move the prerequisite reference data setup to the constructor for the test class.

Buy Now
Questions 13

Universal Containers stores user preferences in a hierarchy custom setting,

user Prefs_c, with a checkbox field, show _help co. Company-level defaults are

stored at the organizational level, but may be overridden at the user level. If a user

has not overridden preferences, then the defaults should be used.

How should the show_Help_ c preference be retrieved for the current user?

Options:

A.

Boolean show = User_Prefa_ c.getValuea().Show_Help_ co;

B.

Boolean show =

User Prefs c.getValues(UserInfo.getUserid{)).Show_Help c;

C.

Boolean show = User_Prefs_c.getlnstance(].Show Help c;

D.

Boolean show = User Prefs_c.show Melp_c;

Buy Now
Questions 14

Universal Containers uses Salesforce to track orders in an order__c object.

The order = object has private organization-wide defaults. The order = object

has a custom field, Quality_Controller_c, that is a Lookup to User and is used

to indicate that the specified User is performing quality control on the order_ co.

What should be used to automatically give read only access to the User set in the

Quality_Controller field?

Options:

A.

Record ownership

B.

Criteria-based sharing

C.

Apex managed sharing

D.

User managed sharing

Buy Now
Questions 15

A corporation has many different Salesforce orgs, with some different objects and some common objects, and wants to build a single Java application that can create, retrieve, and update common object records in all of the different orgs.

Which method of integration should the application use?

Options:

A.

SOAP API with the Partner WSDL

B.

Apex REST Web Service

C.

SOAP API with the Enterprise WSDL

D.

Metadata APT

Buy Now
Questions 16

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?

Options:

A.

Write a Validation Rule on the Contact for the Is Primary logic and a before update trigger on Contact for the last name logic.

B.

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.

C.

Write a single trigger on Contact for both after update and before update and callout to helper classes to handle each set of 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.

Buy Now
Questions 17

A company uses Dpportunities to track sales to their customers and their org has millions of Opportunities. They want to begin to track revenue over time through a related Revenue object.

As part of their initial implementation, they want to perform a one-time seeding of their data by automatically creating and populating Revenue records for Opportunities, based on complex logic.

They estimate that roughly 100,000 Opportunities will have Revenue records created and populated.

What is the optimal way to automate this?

Options:

A.

Use system, acheduladeb() to schedule a patakape.Scheduleable class.

B.

Use system, enqueuJob (| to invoke a gueusable class.

C.

Use Database. executeBatch () to invoke a Queueable class.

D.

Use Database. =executeBatch() to invoke a Database. Batchable class.

Buy Now
Questions 18

For compliance purposes, a company is required to track long-term product usage in their org. The information that they need to log will be collected from more than one object and, over time, they predict they will have hundreds of millions of records.

What should a developer use to implement this?

Options:

A.

Setup audit trail

B.

Field audit trail

C.

Big objects

D.

Field history tracking

Buy Now
Questions 19

Given the following code:

PDII Question 19

Assuming there were 10 Contacts and five Accounts created today, what is the expected result?

Options:

A.

System.QueryException: Too many DML Statement errors on Contact

B.

System.QueryException: List has more than one row for Assignment on Account

C.

Systemn.LimitException: Too many SOQL Queries on Account

D.

System.LimitException: Too many SOQL Queries on Contact

Buy Now
Questions 20

Which use case can be performed only by using asynchronous Apex?

Options:

A.

Querying tens of thousands of records

B.

Making a call to schedule a batch process to complete in the future

C.

Calling a web service from an Apex trigger

D.

Updating a record after the completion of an insert

Buy Now
Questions 21

Assuming the CreateOneAccount class creates one account and implements the

Queueable interface, which syntax properly tests the Apex code?

A)

PDII Question 21

B)

PDII Question 21

C)

PDII Question 21

D)

PDII Question 21

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 22

Which statement is true regarding savepoints?

Options:

A.

You can roll back to any savepoint variable created in any order.

B.

Static variables are not reverted during a rollback.

C.

Reference to savepoints can cross trigger invocations.

D.

Savepoints are not limited by DML statement governor limits.

Buy Now
Questions 23

Universal Containers is using a custom Salesforce application to manage customer

support cases. The support team needs to collaborate with external partners to

resolve certain cases. However, they want to control the visibility and access to the

cases shared with the external partners. Which Salesforce feature can help achieve this requirement?

Options:

A.

Role hierarchy

B.

Criteria-based sharing rules

C.

Apex managed sharing

D.

Sharing sets

Buy Now
Questions 24

There are user complaints about slow render times of a custom data table within a Visualforce page that loads thousands of Account records at once.

What can a developer do to help alleviate such issues?

Options:

A.

Use JavaScript remoting to query the accounts.

B.

Use the transient keyword in the Apex code when querying the Account records.

C.

Upload a third-party data table library as a static resource.

D.

Use the standard Account List controller and implement pagination.

Buy Now
Questions 25

Universal Containers is leading a development team that follows the source-driven development approach in Salesforce. As part of their continuous integration and delivery (CL/CD) process, they need to automatically deploy changes to multiple environments, including sandbox and production.

‘Which mechanism or tool would best support their CI/CD pipeline in source-driven development?

Options:

A.

Salesforce CLI with Salesforce DX

B.

Salesforce Extensions for Visual Studio Code

C.

Change Sets

D.

Ant Migration Tool

Buy Now
Questions 26

A developer is creating a Lightning web component to display a calendar. The component will be used in multiple countries. In some locales, the first day of the week is a Monday, or a Saturday, or a Sunday. ‘What should the developer do to ensure the calendar displays accurately for users in every locale?

Options:

A.

Query the FirstDayofweek field from the Locale for the current user.

B.

Import the @salesforce/i18n module and use

the firstdayofweek internationalization property.

C.

Use a custom metadata type to store key/value pairs.

D.

Use UserInfo.getLocale() in the component.

Buy Now
Questions 27

Which statement is considered a best practice for writing bulk safe Apex triggers?

Options:

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.

Use the Database methods with allorNone set to £21s= instead of DML statements.

Buy Now
Questions 28

An Apex trigger creates a Contract record every time an Opportunity record is

marked as Closed and Won. This trigger is working great, except (due to a recent

acquisition) historical Opportunity records need to be loaded into the Salesforce

instance.

When a test batch of records are loaded, the Apex trigger creates Contract records.

A developer is tasked with preventing Contract records from being created when mass loading the Opportunities, but the daily users still need to have the Contract records created.

‘What is the most extendable way to update the Apex trigger to accomplish this?

Options:

A.

Add the Profile ID of the user who loads the data to the trigger, so the trigger will not fire for this user.

B.

Add a validation rule to the Contract to prevent Contract creation by the user who loads the data.

C.

Use a hierarchy custom setting to skip executing the logic inside the trigger for the user who loads the data.

D.

Use a list custom setting ta disable the trigger for the user who loads the data.

Buy Now
Questions 29

A company wants to incorporate a third-party weh service to set the Address fields

when an Account is inserted, if they have not already been set.

What is the optimal way to achieve this?

Options:

A.

Create a Workflow Rule, execute a Queueable job from it, and make a callout from the Queueable job.

B.

Create an Apex trigger, execute a Queueable job from it, and make a callout from the Queueable job.

C.

Create a Process, execute a Quaueable job from it, and make a callout from the Queueable job.

D.

Create a Before Save Flow, execute a Queueable job from it, and make a callout from the Queusable job.

Buy Now
Questions 30

A company wants to run different logic based on an Opportunity's record type.

Which code segment handles this request and follows best practices?

A)

PDII Question 30

B)

PDII Question 30

C)

PDII Question 30

D)

PDII Question 30

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 31

A company has a custom object, Order__c, that has a custom picklist field, Status__c, with values of ‘New,' 'In Progress,’ or ‘Fulfilled’ and a lookup field,

Contact__c, to Contact.

Which SOQL query will return a unique list of all the Contact records that have no ‘Fulfilled’ Orders?

A)

PDII Question 31

B)

PDII Question 31

C)

PDII Question 31

D)

PDII Question 31

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 32

A developer is trying to access org data from within a test class.

Which sObject type requires the test class to have the (seeAllData=true)

annotation?

Options:

A.

User

B.

RecordType

C.

Report

D.

Profile

Buy Now
Questions 33

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

A)

PDII Question 33

B)

PDII Question 33

C)

PDII Question 33

D)

PDII Question 33

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 34

A developer is creating a Lightning web component that displays a list of records in a lightning-datatable. After saving a new record to the database, the list is not updating.

PDII Question 34

What should the developer change in the code above for this to

happen?

Options:

A.

Call rafrasnApex() ON this.dazta.

B.

Create a new variable to store the result and annotate it with @track.

C.

Create a variable to store the result and call refreshpex().

D.

Add the @track decorator to the data variable.

Buy Now
Questions 35

Refer to the following code snippet:

PDII Question 35

A developer created a JavaScript function as part of a Lightning web component (LWC) that surfaces information about Leads by wire calling geyFetchLeadList whencertain criteria are met.

Which three changes should the developer implement in the Apex class above to ensure the LWC can display data efficiently while preserving security?

Choose 3 answers

Options:

A.

Annotate the Apex method with @AuraEnabled.

B.

Implement the with sharing keyword in the class declaration.

C.

Implement the with keyword in the class declaration.

D.

Use the WZ E D clause within the SOQL query.

E.

Annotate the Apex method with @AuraEnabled(Cacheable=True).

Buy Now
Questions 36

A developer wrote a class named asccuntRisteryManager that relies on field history tracking. The class has a static method called getaccountHistory that Lakes in an Account as a parameter and returns a list of associated accountHistory object records.

The following test fails:

PDII Question 36

What should be done to make this test pass?

Options:

A.

Create Accountdistory records manually in the test setup and write a query to get them.

B.

Use @isTest (SeeAllData=true] to see historical data from the org and query for Accountdistory records.

C.

Use Test. isRunningTest (] in getAccountHistory() to conditionally return fake AccountHistory records.

D.

The tact method should he delated since this code cannat be tested

Buy Now
Questions 37

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 one 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?

Options:

A.

There will be no error and all updates will succeed, since the limit on the number of records processed by DML statements was not exceeded.

B.

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.

C.

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.

D.

The mass update will fail, since the two triggers fire in the same context, thus exceeding the number of records processed by DML statements.

Buy Now
Questions 38

A developer is tasked with creating a Lightning web component that is responsive on various devices,

Which two components should help accomplish this goal?

Choose 2 answers

Options:

A.

lightning-navigation

B.

Lightning-input-location

C.

Lightning-layout

D.

lightning-layout—-item

Buy Now
Questions 39

A developer is writing code that requires making callouts to an external web service.

Which scenario necessitates that the callout be made in an asynchronous method?

Options:

A.

The callouts will be made in an Apex trigger.

B.

The callouts will be made using the REST APL.

C.

Over 10 callouts will be made in a single transaction.

D.

The callout could take longer than 60 seconds to complete.

Buy Now
Questions 40

Which three Visualforce components can be used to initiate Ajax behavior to perform partial page updates?

Choose 3 answers

Options:

A.

B.

C.

D.

E.

Buy Now
Questions 41

A company has a web page that needs to get Account record information, such as name, website, and employee number. The Salesforce record 1D is known to the web page and it uses JavaScript to retrieve the account information.

Which method of integration is optimal?

Options:

A.

Apex SOAP web service

B.

SOAP API

C.

Apex REST web service

D.

REST API

Buy Now
Questions 42

A developer is responsible for formulating the deployment process for a Salesforce project. The project follows a source-driven development approach, and the developer wants to ensure efficient deployment and version control of the metadata changes.

Which tool or mechanism should be utilized for managing the source-driven deployment process?

Options:

A.

Metadata API

B.

Change Sets

C.

Force.com IDE

D.

Salesforce CLI with Salesforce DX

Buy Now
Questions 43

A company's support process dictates that any time a case is closed with a status of "Could net fix," an Engineering Review custom object record should be created and populated with information from the case, the contact, and any of the products associated with the case.

What Is the correct way to automate this using an Apex trigger?

Options:

A.

An after update trigger on Case that creates the Engineering Review record and inserts it

B.

An after upset trigger on Case that creates the Engineering Review record and inserts It .

C.

A before update trigger on Case that creates the Engineering Review record and Inserts It

D.

A before upset trigger on Case that creates the Engineering Review record and Inserts it

Buy Now
Questions 44

Refer to the component code and requirements below:

PDII Question 44

A)

PDII Question 44

B)

PDII Question 44

C)

PDII Question 44

D)

PDII Question 44

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 45

Which scenario requires a developer to use an Apex callout

Instead of Outbound Messaging?

Options:

A.

The target system uses a REST APL.

B.

The target system uses a SCAP API.

C.

The callout needs to be asynchronous.

D.

The callout needs to be invoked from a flow.

Buy Now
Questions 46

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 is stored in a custom object for ease of maintenance by users. The survey Response c object is populated via a custom Visualforce page.

What is the optimal way to implement this?

Options:

A.

Implement the logic in validation rules on the Contact and the Burvey Response_c Objects.

B.

Implement the logic in a helper class that is called by an Apex trigger on Contact and from the custom Visualforce page controller.

C.

Implement the logic in an Apex trigger on Contact and also implement the logic within the custom Visualforce page controller.

D.

Implement the logic in the custom Visualforce page controller and call "that method from an Apex trigger on Contact.

Buy Now
Questions 47

Universal Containers wants to notify an external system, in the event that an unhandled exception occurs, by publishing a custom event using Apex.

What is the appropriate publish/subscribe logic to meet this requirement?

Options:

A.

Publish the error event using the Eventrus.publish() method and have the external system subscribe to the event using CometD.

B.

Publish the error event using the addError () method and write a trigger to subscribe to the event and notify the external system.

C.

Have the external system subscribe to the event channel. No publishing is necessary.

D.

Publish the error event using the addError () method and have the external system subscribe to the event using CometD.

Buy Now
Questions 48

A company uses Salesforce to sell products to customers. They also have an external product information management (PIM) system that is the system of record for products.

A developer received these requirements:

* Whenever a product is created or updated in the PIM, a product must be

created or updated as a Product? record in Salesforce and a PricebookEntry

record must be created or updated automatically by Salesforce.

= The PricebookEntry should be created in a Priceboek2 that is specified in a

custom setting.

What should the developer use to satisfy these requirements?

Options:

A.

Event Monitoring

B.

Invocable Action

C.

SObject Tree REST

D.

Custom Apex REST

Buy Now
Questions 49

A developer is creating a page in App Builder that will be used in the Salesforce mobile app.

Which two practices should the developer follow to ensure the page operates with optimal performance?

Choose 2 answers

Options:

A.

Limit 25 fields on the record detail page.

B.

Limit the number of Tabs and Accordion components.

C.

Analyze the page with Performance Analysis for App Builder.

D.

Limit five visible components on the page.

Buy Now
Questions 50

Refer to the Aura component below:

PDII Question 50

A developer receives complaints that the component loads slowly.

Which change can the developer implement to make the component perform faster?

Options:

A.

Change the type of contactInfo to "Map”.

B.

Move the contents of

C.

Add a change event handler for showContactInfo.

D.

Change the default for showContactInfo to “False.

Buy Now
Exam Code: PDII
Exam Name: Salesforce Certified Platform Developer II (SP24)
Last Update: Apr 25, 2024
Questions: 196

PDF + Testing Engine

$56  $159.99

Testing Engine

$42  $119.99
buy now PDII testing engine

PDF (Q&A)

$35  $99.99
buy now PDII pdf
dumpsmate guaranteed to pass
24/7 Customer Support

DumpsMate's team of experts is always available to respond your queries on exam preparation. Get professional answers on any topic of the certification syllabus. Our experts will thoroughly satisfy you.

Site Secure

mcafee secure

TESTED 27 Apr 2024