Weekend Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: xmas50

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

Page: 4 / 6
Total 202 questions

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?

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

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?

A.

Custom hierarchy setting

B.

Custom metadata type

C.

Custom list setting

D.

Custom object

After a platform event is defined in a Salesforce org,events can be published via which mechanism?

A.

External Apps use an API Co publish event messages.

B.

Internal Apps can use entitlement processes.

C.

External Apps require the standard Streaming API.

D.

Internal Apps can use outbound messages.

Which method should be used to convert a Date to a String in the current user's locale?

A.

String.format

B.

Date.paras

C.

Date. format

D.

String.valueof

A company has an Apex process that makes multiple extensive database operations and web service callouts. The database processes and web services can take a long time to run and must be run sequentially.

How should the developer write this Apex code without running into governor limits and system limitations?

A.

Use Queueable Apex to chain the jobs to run sequentially.

B.

Use Apex Scheduler to schedule each process.

C.

Use multiple 3zutuze methods for each process and callout.

D.

Use Limits class to stop entire process once governor limits are reached.

A developer created a Lightning web component for the Account record page that displays the five most recently contacted Contacts for an Account. The Apex method,

Contacts, returns a list of Contacts and will be wired to a property in the component.

Which two lines must change in the above code to make the Apex method able to be wired?

Choose 2 answers

A.

Add @AuraEnabled {cacheable=trues) to line 08.

B.

Remove private from line 09.

C.

Add public to line 04.

D.

Add @AuraEnabled {cacheable=true) to line 03.

A company has code to update a Request and Request Lines and make a callout to

their external ERP system's REST endpoint with the updated records.

The callousUtil.makeRestCallout fails with a "You have uncommitted work pending. Please commit or rollback before calling cut’ error.

What should be done to address the problem?

A.

Change the callousUtil makeRestCallout to an @InvocsblsMethod method.

B.

Remove the Database. setSavepoint and Database. rollback.

C.

Change the CallousUtill .makeRestCallout to an @future method.

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?

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.

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 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 blocked domains.

The list of blocked domains is stored in a custom object for ease of maintenance by users. 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 validation rules on the Contact and the Burvey Response_c Objects.

B.

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

C.

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

D.

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