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

Developers PDII Passing Score

Page: 9 / 13
Total 193 questions

Salesforce Certified Platform Developer II (SU24) Questions and Answers

Question 33

A developer is writing code that requires making callouts to an external web service.

Which scenario necessitates that the callout be made in an asynchronous method?

Options:

A.

The callouts will be made in an Apex trigger.

B.

The callouts will be made using the REST APL.

C.

Over 10 callouts will be made in a single transaction.

D.

The callout could take longer than 60 seconds to complete.

Question 34

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?

Options:

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.

Question 35

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.

Question 36

Universal Containers has an Apex trigger on Account that creates an Account Plan record when an Account is marked as a Customer.

Recently a record-triggered flow was added so that whenever an Account is marked as a Customer, a "Customer Since’ date field is updated with today's date. Since the addition of the flow, two Account Plan records are created whenever the Account is marked as a Customer.

What might cause this to happen?

Options:

A.

The Apex trigger does not use a static variable to ensure it only fires once.

B.

The flow is configured to use an "Update Records’ element.

C.

The Apex trigger is not bulk safe and calls insert inside of a for loop.

D.

The flow is configured to evaluate when a record is created and every time it is edited.

Page: 9 / 13
Total 193 questions