hiexam
salesforce · CRT-450 · Q606 · multiple_response · topic_1

A developer wants to display all of the picklist entries for the Opportunity StageName field and all of the available r…

A developer wants to display all of the picklist entries for the Opportunity StageName field and all of the available record types for the Opportunity object on a Visualforce page. Which two actions should the developer perform to get the available picklist values and record types in the controller? (Choose two.)
  • A.Use Schema.RecordTypeInfo returned by Opportunity.SObjectType.getDescribe().getRecordTypeInfos().
  • B.Use Schema.PicklistEntry returned by Opportunity.SObjectType.getDescribe().getPicklistValues ().
  • C.Use Schema.RecordTypeInfo returned by RecordType.SObjectType.getDescribe().getRecordTypeInfos().
  • D.Use Schema.PicklistEntry returned by Opportunity.StageName.getDescribe().getPicklistValues ().
Explanation
Correct answer is A and D. https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Schema_PicklistEntry.htm#apex_Schema_PicklistEntry_methods

Reference: examtopics_top_comment

Practice with progress tracking

Sign in to track wrong answers, get spaced-repetition reminders, and run timed exam mode.