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

Salesforce CRT-450 Based on Real Exam Environment

Page: 7 / 18
Total 235 questions

Salesforce Certified Platform Developer I (SP23) Questions and Answers

Question 25

A developer considers the following snippet of code:

Based on this code, what is the value of x?

Options:

A.

3

B.

1

C.

4

D.

2

Question 26

A developer is creating a page that allows users to create multiple Opportunities. The developer is asked to verify the current user's default } |

Opportunity record type, and set certain default values based on the record type before inserting the record.

How can the developer find the current user's default record type? ns

Options:

A.

Query the Profile where the ID equals userInfo.getProfileID() and then use the profile.Opportunity.getDefaultRecordType() | |method. ] |

B.

Use Opportunity. SObjectType.getDescribe().getRecordTypelnfos() to get a list of record types, and iterate through them until [ J

isDefaultRecordTypeMapping() is true. Pencil & Paper |

C.

Use the Schema.userlnfo.Opportunity.getDefaultRecordType() method. <

Create the opportunity and check the opportunity.recordType before inserting, which will have the record ID of the current Dal user's default record type.

Question 27

A developer is creating a test coverage for a class and needs to insert records to validate functionality. Which method annotation should be used to create records for every method in the test class?

Options:

A.

@BeforeTest

B.

@isTest(SeeAllData=True)

C.

@TestSetup

D.

@PreTest

Question 28

Which annotation should a developer use on an Apex method to make it available to be wired to a property in a Lightning web component?

Options:

A.

@RemoteAction

B.

@AureEnabled

C.

@AureEnabled (cacheable=true)

D.

@RemoteAction(|cacheable=true)

Page: 7 / 18
Total 235 questions