Happy Halloween Limited Time 50% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 5550b640

PDII Exam Dumps - Salesforce Certified Platform Developer II (SU21)

Question # 4

A developer wrote a trigger on Opportunity that will update a custom Last Sold Date field on the Opportunity's Account whenever an Opportunity is dosed. In the test class for the trigger, the assertion to validate the Last Sold Date field fails.

What might be causing the failed assertion?

A.

The test class has not defined an Account owner when inserting the test data.

B.

The test class has not re-queried the Account record after updating the Opportunity.

C.

The test class has not implemented seeAIIData-truwh the test method.

D.

The test class is not using System.runAs() to run tests as a Salesforce administrator.

Full Access
Question # 5

In an organization that has multi-currency enabled, a developer is tasked with building a Lighting Component that displays the top ten Opportunities most recently access by the logged in user. The developer must ensure the Amount and LastModifiedDate field values are displayed according to the user's locale.

What is the most effective approach to ensure values displayed respect the users locale settings?

A.

Use the FOR VIEW clause in the SOQL Query.

B.

Use REGEX expressions to format the values retrieved via SOQL.

C.

Use the FORMAT() function in the SOQL query.

D.

Use a wrapper class to format the values retrieved via SOQL.

Full Access
Question # 6

A developer receives the exception 'SOQL query not selective enough' when performing a query on an object with a large amount of data. Which step should be taken to resolve the issue?

A.

Use an ID in the WHERE clause of the SOQL query.

B.

Perform the SOQL query as part of a FOR loop.

C.

Perform the SOQL query via a call to the REST API.

D.

Move the SOQL query to within an asynchronous process.

Full Access
Question # 7

Which are relevant practices while analyzing the timeline of different types of transactions in the execution overview panel? (Choose two.)

A.

Log lines in the execution log panel can be analyzed for details about specific events

B.

The performance tree should be use to analyze events further starting from the one that take the least amount of time

C.

The execution tree can be used with the execution log to filter and get specific information about events

D.

Multiple short bursts of Apex events should be analyzed since they can add up to a significant amount of time

Full Access
Question # 8

A Lightning Component has a section that displays some information about an Account and it works well on the desktop, but users have to scroll horizontally to see the Description field output on their mobile devices and tablets.

Which option has the changes to make the component responsive for mobile and tablet devices?

A.

B.

C.

D.

E.

Option A

F.

Option B

G.

Option C

Full Access
Question # 9

How many Territories can an instance of salesforce have?

A.

400

B.

200

C.

1000

D.

100

E.

500

Full Access
Question # 10

Where in a query can you use Geolocation and Distance? (Choose two.)

A.

Select clause

B.

Filter clause

C.

Order By clause

D.

Group By clause

Full Access
Question # 11

A developer wants to use an Aura Component with a Custom Action.

What should be considered in order to do this?

A.

A default value must be provided for each component attribute marked as required.

B.

The component must implement the force:lightningQuickActionButton interface.

C.

The component's JavaScript controller must handle a method on initialization.

D.

The class "slds-modal__container" must be added to the top-level element of the component.

Full Access
Question # 12

Which of the following about Dynamic Apex is incorrect?

A.

You can retrieve the sObject type from an Id by calling .getSObjectTypeQ

B.

getDescribe() can get you a variety of info on a particular object/field

C.

Schema.getGlobalDescribeQ gives you a map of all sObject

D.

In dynamic SOQL, you can use bind variables and bind variable fields

Full Access
Question # 13

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?

A.

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

B.

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

C.

Move the prerequisite reference data setup to a static method in the test class and call that from each test method.

D.

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

Full Access
Question # 14

A developer has created a Team Member sObject that has a Master-Detail relationship to a Project sObject and a Lookup relationship to the User sObject. The developer must ensure that a User listed on a Team Member record has Read-Write access to the parent Project record.

How can the developer accomplish this if the Project sObject has a Private sharing model and thousands of Project records?

A.

Create a Controller that uses the Without Sharing keyword

B.

Create a Criteria-Based Sharing Rule on the Project sObject

C.

Create a Team Member Trigger that inserts Project_Share records

D.

Create a Project Sharing Rule that shares to the Team Member Group

Full Access
Question # 15

What is the transaction limit for the number of records for SOSL?

A.

20

B.

2,000

C.

100 (synchronous), 200 (async)

D.

200 (synchronous), 100 (async)

E.

There is no limit

Full Access
Question # 16

What is the transaction limit on the number of callouts?

A.

100

B.

150

C.

50

D.

200

E.

There is no limit

Full Access
Question # 17

A developer is writing a Visualforce page that queries accounts in the system and presents a data table with the results. The users want to be able to filter the results based on up to five fields. However, the users want to pick the five fields to use as filter fields when they run the page.

Which Apex code feature is required to facilitate this solution'

A.

Streaming API

B.

Dynamic SOQL

C.

Report API

D.

Dynamic variable binding

Full Access
Question # 18

Which two queries are selective SOQL queries and can be used for a large data set of 200,000 Account records? Choose 2 answers

A.

SELECT id FROM ACCOUNT WHERE Name = !: ' '

B.

SELECT id FROM ACCOUNT WHERE Name = Null

C.

SELECT id FROM ACCOUNT WHERE Name = Null AND Customer_Number_c= 'ValueA'

D.

SELECT id FROM ACCOUNT WHERE id IN (list of Account Ids)

Full Access
Question # 19

Which tag should a developer use to display different text while an is executing versus not executing?

A.

B.

C.

D.

Full Access
Question # 20

Refer to the code snippet below:

When a Lightning web component is rendered, a list of opportunity that match certain criteria should be retrieved from the database and displayed to the end-user.

Which three considerations must the developer implement to make the fetchOpps method available within the Lightning web component?

A.

The fetchOpps method must be annotated with the %InvocableMethod annotation.

B.

The fetchOpps method must specify the (continustion-true) attribute

C.

The fetchOpps method cannot mutate the result set retrieved from the database.

D.

The fetchOpps method must specify the (cacheable =true) attribute

E.

The fecthOpps method must be annotated with the @ AuraEnabled annotation.

Full Access
Question # 21

A developer receives an error when trying to call a global server-side method using the @remoteAction decorator. How can the developer resolve the error?

A.

Add static to the server-side method signature.

B.

Decorate the server-side method with (static=true).

C.

Change the function signature to be private static.

D.

Decorate the server-side method with (static=false)

Full Access
Question # 22

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 blacklisted domains. The list of blacklisted domains will be stored In a custom object for ease of

maintenance by users. Note that the Survey_Response__c object is populated via a custom visualforce page.

What is the optimal way to implement this?

A.

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

B.

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

C.

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

D.

Implement the logic in a Validation Rule on the Contact and a validation Rule on the Survey_Response__c object.

Full Access
Question # 23

A custom Aura component, AddressValidation,cmp,exists in the system. The Salesforce admin for the organization is unable to find and select the component while creating a quick action for the Account sObject.

What should the developer do to ensure that AddressValidation,cmp can be selected when creating a quick action?

A.

Ensure the component implements the lightning:actionOverride interface.

B.

Ensure the component implements the force:lighningQuickAction.interface.

C.

Ensure the access attribute of the aura:component tag is st t Global.

D.

Ensure the component implements the force:hasRecordedId interface.

Full Access
Question # 24

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 Settings to ensure custom messages are translated properly.

B.

Use Custom Labels to ensure custom messages are translated property.

C.

Use Custom Metadata to translate custom picklist values.

D.

Use Custom Objects to translate custom picklist values.

Full Access
Question # 25

The Salesforce instance at Universal Containers currently integrates with a third-party company to validate mailing addresses via REST services. The third-party address verification system recently changed endpoint URLs for all their set vices from https://th-addreaa-service.3pc.com to https://plc1-mailsarvice.3pc.com. Everything else remained the same. The developer updated code to reflect this endpoint change, but the mailing address validation service stopped working after the change.

What else should be done to complete this web service end point change?

A.

Test the callout property using HttpCalloutMock.

B.

Add web service IP Addresses to Trusted IP Ranges m the Network Access security controls settings.

C.

Use a Custom Setting with the new endpoint Instead of hard coding the URL.

D.

Create a new Remote Site for the new endpoint URL.

Full Access
Question # 26

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

A.

B.

C.

D.

E.

Full Access
Question # 27

Universal Containers wants to be able to bring up an Account detail page and view a table of containers currently being rented. The user wants to be able to dick on a container In the table and quickly edit and save the location of the container.

In addition to this, the page should have a section that shows the location of each container on a map. Universal Containers wants the map to re-render whenever the location of a container is changed.

What can a developer use to accomplish this task?

A.

Two Lightning Components leveraging Application Events

B.

Two Visualforce Page Components leveraging Application Events

C.

A single visualforce Page leveraging Platform Events

D.

Two Lightning Components leveraging Platform Events

Full Access
Question # 28

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

What can the developer use to perform the validations, and allow multiple error messages to be displayed simultaneously?

A.

Apex REST

B.

External JavaScript Library

C.

Apex Trigger

D.

Process Builder

Full Access
Question # 29

An org contains two custom objects; Building__c and Office__c. Office__c has a Lookup field to Building__c.

A developer is asked to automatically populate the Number_of_Offices__c field on the Building__c object with the count of related Office__c

records anytime an Office__c record s created or deleted. The developer cannot modify the field types.

Which solution meets the requirements?

A.

Flow

B.

Workflow

C.

Apex Trigger

D.

Process Builder

Full Access
Question # 30

A developer wants to integrate invoice and invoice line data into Salesforce from a custom billing system. The developer decides to make realtime callouts from the billing system using the SOAP API. Unfortunately, the developer is getting a lot of errors when inserting the invoice line data because the invoice header record doesn't exist yet.

What will help ensure ne transactional Integrity of the integration?

A.

Create the invoice header and the related invoice lines in the same create() call leveraging External Ids.

B.

Develop a custom Apex web service to handle a custom JSON data structure with both invoice header and related invoice lines.

C.

Use an ETL tool and the Bulk API running nightly, thus ensuring all of the data is handled at the same time.

D.

Set the AIIOrNoneHeader to true when calling each of create() for invoice headers and create() for invoice lines.

Full Access
Question # 31

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.

E.

Option A

F.

Option B

G.

Option C

Full Access
Question # 32

A company has a Request__c object that has a lookup to the Opportunity object and a custom field. Status__c, with values of Open,' Closed,

and Invalid.' An Opportunity should not be allowed to be deleted if there are any Request__c records related to it that have a Status__c value

of Open or 'Closed.'

what is the optimal way to enforce the requirement to prevent deletion?

A.

A Process on Request__c

B.

A Process on Opportunity

C.

An Apex Trigger on Opportunity

D.

An Apex Trigger on Request__c

Full Access
Question # 33

An org has a requirement that the Shipping Address on the Account must be validated by a third-party web service, before the Account is allowed to be inserted.

What is the optimal way to meet this requirement?

A.

Make a callout to the web service from a custom Visualforce controller.

B.

Make a callout to the web service from a standard Visualforce controller.

C.

Make a callout to the web service from an after insert trigger.

D.

Make a callout to the web service from a before insert trigger.

Full Access
Question # 34

In a VisualForce page with a VisualForce component that has rendered set to false when the page loads, how can a developer ensure it will show on a re-render?

A.

Set the re-render attribute of the component to true.

B.

Perform a full page refresh since rendered elements cannot be re-rendered without refreshing.

C.

Set the rendered attribute of the component to true and re-render the component.

D.

Set the rendered attribute of the component to true and re-render a parent component.

Full Access
Question # 35

Just prior to a new deployment, the Salesforce Administrator who configured a new order fulfillment process in a developer sandbox suddenly left the company. The users had fully tested all of the changes in the sandbox and signed off on them.

Unfortunately, although a Change Set was started, it was not complete. A developer is brought in to help finish the deployment.

What should the developer do to identify the configuration changes that need to be moved into production?

A.

Leverage the Setup Audit Trail to review the changes made by the departed Administrator and identify which changes should be added to the Change Set.

B.

Use the Metadata API and a supported development IDE to push all of the configuration from the sandbox into production to ensure no changes are lost.

C.

Set up Continuous Integration and a Git repository to automatically merge all changes from the sandbox metadata with the production metadata.

D.

In Salesforce setup, look at the last modified date for every object to determine which should be added to the Change Set.

Full Access
Question # 36

A developer needs to implement a system audit feature that allows users, assigned to a custom profile named "Auditors", to perform searches against the historical records in the Account object. The developer must ensure the search is able to return history records that are between 12 and 24 months old.

Given the code below, which select statement should be inserted below as a valid way to retrieve the Account History records ranging from 12 to 24 month old?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 37

A company decides that every time an Opportunity is created, they want to create a follow up Task and assign it to the Opportunity Owner.

What should a developer use to implement the requirements?

A.

A Process Builder on Opportunity

B.

A trigger on Task

C.

A trigger on Opportunity

D.

A Process Builder on Task

Full Access
Question # 38

A developer is developing a reuseable Aura Component that will reside on an sObject Lightning Page with the following HTML snippet:

A.

Set the sObject type as a component attribute.

B.

Add force:hasSobjectName to the implements.

C.

Use the getSObjectTypeQ method in an Apex class.

D.

Create a design attribute and configure via App builder.

Full Access
Question # 39

A developer has working business logic code, but sees the following error in the test class:

You have uncommitted work pending. Please commit or rollback before calling out. What is a possible solution?

A.

Rewrite the business logic and test classes with √ā¬©TestVisible set on the callout.

B.

Set seeAIIData to "true" at the top of the test class, since the code does not fail in practice.

C.

Call support for help with the target endpoint, as it is likely an external code error.

D.

Use test.IsRunningTest() before making the callout to bypass it in test execution.

Full Access
Question # 40

A developer needs to store variables to control the style and behavior of a Lightning Web Component. Which feature should be used to ensure that the variables are testable in both Production and all Sandboxes?

A.

Custom Metadata

B.

Custom Object

C.

Custom Setting

D.

Custom Variable

Full Access
Question # 41

A company has a custom object Sales_Help_Request__c that has a Lookup relationship to Opportunity. The Sales_Help_Request__c has a number field, Number_of_Hours__c, that represents the amount of time spent on the Sales_Help_Request__c.

A developer is tasked with creating a field, Total_Hours__c, on Opportunity that should be the sum of all of the Number_of_Hours__c values for the Sales_Help_Request__c records related to that Opportunity.

What should the developer use to implement this?

A.

A workflow rule on the Sales_Help_Request__c object

B.

A roll-up summary field on the Opportunity object

C.

A trigger on the Opportunity object

D.

A trigger on Sales_Help_Request__c

Full Access
Question # 42

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?

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.

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

D.

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

Full Access
Question # 43

A developer wrote an Apex class to make several callouts to an external system.

If the URLs used in these callouts will change often, which feature should the developer use to minimize changes needed to the Apex class?

A.

Session Id

B.

Connected Apps

C.

Remote Site Settings

D.

Named Credentials

Full Access
Question # 44

When calling a RESTful web service, a developer receives a JSON payload that has a data hierarchy that is nested three levels deep. How can the developer describe the external data?

A.

Deserialize the data untyped and then process it.

B.

Declare a class with three levels and deserialize the JSON typed with this class.

C.

Use the ANT migration tool, the custom metadata API, or the Dataloader.

D.

Use middleware to flatten the JSON and consume it as a new custom object.

Full Access
Question # 45

A company manages information about their product offerings in custom objects named Catalog and Catalog Item. Catalog Item has a master-detail field to Catalog, and each Catalog may have as many as 100,000 Catalog Items.

Both custom objects have a CurrencylsoCode Text field that contains the currency code they should use. If a Catalog's CurrencylsoCode changes, all of its Catalog Items' CurrencylsoCodes should be changed as well.

What should a developer use to update the CurrencylsoCodes on the Catalog Items when the Catalog's CurrencylsoCode changes^5

A.

An after insert trigger on Catalog that updates the Catalog Items if the Catalog's CurrencylsoCode is different

B.

An after insert trigger on Catalog Item that updates the Catalog Items if the Catalog's CurrencylsoCode is different

C.

A Database.Schedulable and Database.Batchable class that queries the Catalog object and updates the Catalog Items if the Catalog CurrencylsoCode is different

D.

A Database.Schedulable and Database.Batchable class that queries the Catalog Item object and updates the Catalog Items if the Catalog CurrencylsoCode is different

Full Access
Question # 46

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 A

B.

Option B

C.

Option C

D.

Option D

Full Access