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

Salesforce PDII - Salesforce Certified Platform Developer II (Plat-Dev-301)

Page: 1 / 6
Total 202 questions

An Aura 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.

How should a developer change the component to be responsive for mobile and tablet devices?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

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?

A.

Apex REST web service

B.

Apex SOAP web service

C.

Apex SOAP callout

D.

Apex REST callout

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?

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.

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.

Refer to the Lightning component below:

The Lightning Component allows users to click a button to save their changes and then redirects them to a different page.

Currently when the user hits the Save button, the records are getting saved, but they are not redirected.

Which three techniques can a developer use to debug the JavaScript?

Choose 3 answers

A.

Use console.log () messages in the JavaScript.

B.

Use the browser's dev tools to debug the JavaScript.

C.

Enable Debug Mode for Lightning components for the user.

D.

Use Developer Console to view checkpoints.

E.

Use Developer Console to view the debug log.

A developer wrote the following method to find all the test accounts in the org:

What should be used to fix this failing test?

A.

Test. fixsdSsarchReaulta [) method to set up expected data

B.

@isTest (SeeAllData=true) to access org data for the test

C.

@testsetup method to set up expected data

D.

Teat.loadData to set up expected data

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?

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

Exhibit:

The test method above tests in Apex trigger that the developer knows will make a lot of queries when a lot of Accounts are simultaneously updated to be customers.

The test method fails at the Line 20 because of too many SOQL queries.

What is the correct way to fix this?

A.

Change the DataFactory class to create fewer Accounts so that the number of queries in the trigger is reduced

B.

Add Test.startTest() before and Test.stopTest() after both Line 7 of the code and Line 20 of the code

C.

Add Test.startTest() before Line 18 of the code and add Test.stopTest() after line 18 of the code

D.

Replace most of the Apex Trigger with Process Builder processes to reduce the number of queries in the trigger

Universal Containers analyzes a Lightning web component and its Apex controller

class that retrieves a list of contacts associated with an account. The code snippets

are as follows:

Based on the code snippets, what change should be made to display the contacts’ mailing addresses in the Lightning web component?

A.

Add a new method in the Apex controller class to retneve the mailing addresses separately and modify the Lightning web component to invoke this method.

B.

Extend the lightning-datatable component in the Lightning web component to include a column for the MailingAddress field.

C.

Modify the SOQL guery in the getAccountContacts method to include the MailingAddress field.

D.

Modify the SOQL query in the getAccountContacts method to include the MailingAddress field and update the columns attribute in javascript file to add Mailing address fields.

Consider the Apex controller below, that is called from an Aura component.

What is wrong with this code?

A.

Line 1: class must be global

8. Lines 1 and 6: class and method must be global

B.

Line 6: method must be static

C.

Line 8: method must first serialize the list to JSON before returning