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

PDF CRT-450 Study Guide

Page: 3 / 18
Total 235 questions

Salesforce Certified Platform Developer I (SP23) Questions and Answers

Question 9

When the code executes, a DML exception is thrown.

How should a developer modify the code to ensure exceptions are handled gracefully?

Options:

A.

Implement the upsert DML statement.

B.

Implement Change Data Capture.

C.

Implement a try/catch block for the DML.

D.

Remove null items from the list of Accounts.

Question 10

A developer created a trigger on the Account object and wants to test if the trigger is properly bulklfield. The developer team decided that the trigger should be tested with 200 account records with unique names.

What two things should be done to create the test data within the unit test with the least amount of code? Choose 2 answers

A developer created a trigger on the Account object and wants to test if the trigger is properly bulklfield. The developer team decided that the trigger should be tested with 200 account records with unique names.

What two things should be done to create the test data within the unit test with the least amount of code?

Choose 2 answers

Options:

A.

Use the @isTest(isParallel=true) annotation in the test class.

B.

Use Test.loadData to populate data in your test methods.

C.

Use the @isTest(seeAllData=true) annotation in the test class.

D.

Create a static resource containing test data.

Question 11

The sales management team at Universal Container requires that the Lead Source field of the Lead record be populated when a.. converted.

What should be done to ensure that a user populates the Lead Source field prior to converting a Lead?

Options:

A.

Use a formula field.

B.

Use a validation rule.

C.

Use Lead Conversation field mapping.

D.

Create an after trigger on Lead.

Question 12

How should a developer write unit tests for a private method in an Apex class?

Options:

A.

Use the SeeAllData annotation.

B.

Add a test method in the Apex class.

C.

Use the TestVisible annotation.

D.

Mark the Apex class as global.

Page: 3 / 18
Total 235 questions