Summer Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: exc65

A developer notices the execution of all the test methods in a class takes a long time to run, due to the initial setup of all the test data that is needed to perform the tests. What should the developer do to speed up test execution?

A.

Define a method that creates test data and annotate with @testSetup.

B.

Define a method that creates test data and annotate with @createData.

C.

Ensure proper usage of test data factory in all test methods.

D.

Reduce the amount of test methods in the class.

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?

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.

Refer to the following code snippet:

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

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).

A developer creates an application event that has triggered an infinite loop.

What may have caused this problem?

A.

The event is fired from a custom renderer.

B.

The event has multiple handlers registered in the project.

C.

The event handler calls a trigger.

D.

An event is fired ‘ontouchend'’ and is unhandled.

A developer is asked to look into an issue where a scheduled Apex is running into DML limits. Upon investigation, the developer finds that the number of records processed by the scheduled Apex has recently increased to more than 10,000.

What should the developer do to eliminate the limit exception error?

A.

Use the @future annotation.

B.

Implement the Qususabls interface.

C.

Implement the Batchable interface.

D.

Use platform events.

A developer needs to send Account records to an external system for backup purposes. The process must take a snapshot of Accounts as they are saved and then make a callout to a RESTful web service. The web service can only receive, at most, one record per call.

What should a developer do to implement these requirements?

A.

Implement the Queveable interface.

B.

Implement platform events.

C.

Expose an Apex class as e web service.

D.

Create a future method.

A developer has a requirement to query three fields (Id, Name, Type) from an Account; and first and last names for all Contacts associated with the Account.

Which option is the preferred, optimized method to achieve this for the Account named ‘Ozone Electronics’?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

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?

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.

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?

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.

Users report that a button on a custom Lightning web component (LWC) is not

saving the data they enter. The button looks to be clicked, but the LWC simply sits

there, seemingly doing nothing.

What should the developer use to ensure error messages are properly displayed?

A.

Add a try-catch block surrounding the DML statement.

B.

Use the Database method with a110rNone Set to false.

C.

Add the tag to the component.

D.

Add JavaScript and HTML to display an error message.