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

Developers CRT-450 Exam Questions and Answers PDF

Page: 6 / 18
Total 235 questions

Salesforce Certified Platform Developer I (SP23) Questions and Answers

Question 21

A developer wrote Apex code that calls out to an external system. How should a developer write the test to provide test coverage?

Options:

A.

Write a class that extends HTTPCalloutMock.

B.

Write a class that implements the HTTPCalloutMock interface.

C.

Write a class that implements the WebserviceMock interface.

D.

Write a class that extends WebserviceMock

Question 22

A developer observes that an Apex test method fails in the Sandbox. To identify the issue, the developer copies the code inside the test method and executes it via the Execute Anonymous tool in the Developer Console. The code then executes with no exceptions or errors. Why did the test method fail in the sandbox and pass in the Developer Console?

Options:

A.

The test method has a syntax error in the code.

B.

The test method relies on existing data in the sandbox.

C.

The test method is calling an @future method.

D.

The test method does not use System.runAs to execute as a specific user.

Question 23

A developer is creating a Lightning web component to showa list of sales records.

The Sales Representative user should be able to see the commission field on each record. The Sales Assistant user should be able to see all

fields on the record except the commission field.

How should this be enforced so that the component works for both users without showing any errors?

Options:

A.

Use WITH SECURITY_ENFORCED in the SOQL that fetches the data for the component.

B.

Use Security. stripInaccessible to remove fields inaccessible to the current user.

C.

Use Lightning Data Service to get the collection of sales records.

D.

Use Lightning Locker Service to enforce sharing rules and field-level security.

Question 24

What are two ways for a developer to execute tests in an org?

Options:

A.

Tooling API

B.

Developer console

C.

Bulk API

D.

Matadata API

Page: 6 / 18
Total 235 questions