nerdexam
Salesforce

CRT-450 · Question #6

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…

The correct answer is B. Use Opportunity. SObjectType.getDescribe().getRecordTypelnfos() to get a list of record types. See the full explanation below for the reasoning.

Question

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

  • AQuery the Profile where the ID equals userInfo.getProfileID() and then use the
  • BUse Opportunity. SObjectType.getDescribe().getRecordTypelnfos() to get a list of record types,
  • CUse the Schema.userlnfo.Opportunity.getDefaultRecordType() method. < Create the opportunity

How the community answered

(24 responses)
  • A
    8% (2)
  • B
    71% (17)
  • C
    21% (5)

Community Discussion

No community discussion yet for this question.

Full CRT-450 Practice