Pass the Salesforce Developers PDII Questions and answers with CertsForce

Viewing page 4 out of 6 pages
Viewing questions 31-40 out of questions
Questions # 31:

A company has many different unit test methods that create Account records as

part of their data setup. A new required field was added to the Account and now all

of the unit tests fail.

What is the optimal way for a developer to fix the issue?

Options:

A.

Add the required field to the data setup for all of the unit tests.


B.

Add a before insert trigger on Account to set the value of the required field,


C.

Change the required field to be a validation rule that excludes the System Administrator profile.


D.

Create a TestDataFactory class that serves as the single place to create Accounts for unit tests and set the required field there.


Expert Solution
Questions # 32:

A developer is developing a reusable Aura component that will reside on an sObject Lightning page with the following HTML snippet:

Question # 32

How can the component"5 controller get the context of the Lightning page that the sObject is on without requiring additional test coverage?

Options:

A.

Add force:hasSobjectName to the implements attribute.


B.

Use the gerSubjectType method in an Apex class.


C.

Set the sObject type as a component attribute.


D.

Create a design attribute and configure via App Builder.


Expert Solution
Questions # 33:

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


Expert Solution
Questions # 34:

Consider the below trigger intended to assign the Account to the manager of the Account's region:

Question # 34

Which two changes should a developer make in this trigger to adhere to best practices?

Choose 2 answers

Options:

A.

PDII Question 34 Option 1


B.

34


C.

34


D.

34


Expert Solution
Questions # 35:

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


Expert Solution
Questions # 36:

A developer used custom settings to store some configuration data that changes occasionally. However, tests are now Failing in some of the sandboxes that were recently refreshed.

What should be done to eliminate this issue going forward?

Options:

A.

Set the setting type on the custom setting to List.


B.

Replace custom settings with static resources.


C.

Set the setting type on the custom setting to Hierarchy.


D.

Replace custom settings with custom metadata.


Expert Solution
Questions # 37:

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.


Expert Solution
Questions # 38:

A developer is building a Lightning web component that retrieves data from Salesforce and assigns it to the record property.

Question # 38

What must be done in the component to get the data from Salesforce?

A)

Question # 38

B)

Question # 38

C)

Question # 38

Options:

A.

Option A


B.

Option B


C.

Option C


Expert Solution
Questions # 39:

Universal Containers needs to integrate with their own, existing, internal custom web application. The web application accepts JSON payloads, resizes product images, and sends the resized images back to Salesforce.

What should the developer use to implement this integration?

Options:

A.

An Apex trigger that calls an @future method that allows callouts


B.

A platform event that makes a callout to the web application


C.

A flow that calls an @future method that allows callouts


D.

A flow with an outbound message that contains a session ID


Expert Solution
Questions # 40:

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 certain conditions are met.

What is the optimal way to accomplish this?

Options:

A.

Use an Email Alert with Flow Builder.


B.

Use MassEmailMEssage () With an Apex trigger.


C.

Use a Workflow Email Alert.


D.

Use SingleEmailMessage() with an Apex trigger.


Expert Solution
Viewing page 4 out of 6 pages
Viewing questions 31-40 out of questions