Black Friday Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: cramtick70

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

Questions 4

The use of the transient keyword in Visualforce page controllers helps with which common performance issue?

Options:

A.

Reduces load times

B.

Improves page transfers

C.

Reduces view state

D.

Improves query performance

Buy Now
Questions 5

A developer created 2 class that implements the Queueable Interface, as follows:

As part of the deployment process, the developer is asked to create a corresponding test class.

Which two actions should the developer take to successfully execute the test class?

Choose 2 answers

Options:

A.

Implement seeAllData=True to ensure the Queueable job is able to run in bulk mode.

B.

Ensure the running user of the test class has, at I the View All permission on the Order object.

C.

Enclose System.enqueueJob(new OrderQueueableJob ()] within Tess. and Test .stopTest (1.

D.

Implement Test. isRunningTest() to prevent chaining jobs during test execution.

Buy Now
Questions 6

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

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.

Buy Now
Questions 7

A company needs to automatically delete sensitive information after seven years.

This could delete almost a million records every day.

How can this be achieved?

Options:

A.

Schedule an 3fuzure process to query records older than seven years, and then recursively invoke itself in 1,000 record batches to delete them,

B.

Use aggregate functions to query for records older than seven years, and then delete the aggrigateResults objects.

{civ [+] Schedule a batch Apex process to run every day that queries and deletes records older than seven years.

C.

Perform a SOSL statement to find records older than 7 years, and then delete the entire result set.

Buy Now
Questions 8

A developer is working on an integration between Salestorce and an external system. The integration requires sending a large amount of data to the external systern, which can cause long response times and timeouts.

To optimize the performance and avoid timeouts, which technique should be used?

Options:

A.

Use a chained batch Apex to split the data into smaller batches.

B.

Implement an asynchronous callout using the Continuation class,

C.

Increase the timeout limit in the callout options,

D.

Use the @future annotation to make the callout asynchronous.

Buy Now
Questions 9

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 10

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 11

An org records customer order information in a custom object, ordar__c, that has

fields for the shipping address. A developer is tasked with adding code to calculate

shipping charges on an order, based on a flat percentage rate associated with the

region of the shipping address.

What should the developer use to store the rates by region, so that when the changes are deployed to production no additional steps are needed for the calculation to work?

Options:

A.

Custom hierarchy setting

B.

Custom metadata type

C.

Custom list setting

D.

Custom object

Buy Now
Questions 12

Universal Containers wants to notify an external system in the event that an unhandled exception occurs when their nightly Apex batch job runs.

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

Options:

A.

Have the external system subscribe to a custom Platform Event that gets fired with addError{).

B.

Have the external system subscribe to a custom

Platform Event that gets fired with EventBus.publish(1,

C.

Have the external system subscribe to a standard

Platform Event that gets fired with with Eventbus.publish(1.

D.

Have the external system subscribe to a standard Platform Event that gets fired.

Buy Now
Questions 13

How should a developer verify that a specific Account record is being tested in a test

class for a Visualforce controller?

Options:

A.

Insert the Account in the test class, instantiate the page reference in the test class, then use System.currentFageReference() .getFarameters() .put{) to set the Account ID.

B.

Insert the Account into Salesforce, instantiate the page reference in the test class, then use system. setFarentRecordId() .get() to set the Account ID.

{of Instantiate the page reference in the test class, insert the Account in

the test class, then use =seeAllData=trus to view the Account.

C.

Instantiate the page reference in the test class, insert the Account in

the test class, then use system.setFarentRecordrd() .get() to set the Account ID,

Buy Now
Questions 14

A developer writes a Lightning web component that displays a dropdown list of all custom objects in the org from which a user will select. An Apex method prepares and returns data to the component.

What should the developer do to determine which objects to include in the response?

Options:

A.

Check the isCustom() value on the sObject describe result,

B.

Import the list of all custom objects from @salesforce/schema.

C.

Check the getobiectType [) value for ‘Custom’ or "Standard’ on the sObject describe result.

D.

Use the getcustomobjects() method from the Schema class.

Buy Now
Questions 15

An org has 2 requirement that addresses on Contacts and Accounts should be normalized to a company standard by Apex code any time that they are saved.

What is the optimal way to implement this?

Options:

A.

Apex triggers on Contact and Account that call a helper class to normalize the address

B.

Apex trigger on Account that calls the Contact trigger to normalize the address

C.

Apex triggers on Contact and Account that normalize the address

D.

Apex trigger on Contact that calls the Account trigger to normalize the address

Buy Now
Questions 16

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 17

What is the best practice to initialize a Vizualforce page in a test class?

Options:

A.

Use Test. setCurrentPage (Page. MyTeatPage);

B.

Use Test. currantPage .getParamatars put (MyTaestPaga) ;

C.

Use controller. currentPage. setPage (MyTastfage) ;

D.

Use Test. setCurrentPage MyTestPags;

Buy Now
Questions 18

How can a developer efficiently incorporate multiple JavaScript libraries in an Aura component?

Options:

A.

Use JavaScript remoting and script tags.

B.

Use CDNs with script attributes.

C.

Implement the libraries in separate helper files.

D.

Join multiple assets from a static resource.

Buy Now
Questions 19

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

Choose 2 answers

Options:

A.

SELECT Id FROM Account WHERE Name LIKE '!-NULL

B.

SELECT Id FRCM Account WHERE Name != ’ ’

C.

SELECT Id FRCM Account WHEP Name IN (List of Names) AND Customer_Number_c= 'ValueA

D.

SELECT Id FROM Account WHERE II IK (List of Account Ida)

Buy Now
Questions 20

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 21

Which three actions must be completed in a Lightning web component for a JavaScript file In a static resource to be loaded? Choose 3 answers

Options:

A.

Import the static resource.

B.

Reference the static resource in a