200k views
2 votes
A developer wants to display all of the available record types for a Case object. The developer also wants to display the picklist values for the Case.Status field. The Case object and the Case Status field are on a custom visualforce page. Which action can the developer perform to get the record types and picklist values in the controller? Choose 2 answersA. Use Schema.PicklistEntry returned by Case.Status.getDescribe().getPicklistValues()

B. Use Schema.RecordTypeInfo returned by Case.sObjectType.getDescribe().getRecordTypeInfos()
C. Use SOQL to query Case records in the org to get all values for the Status picklist field
D. Use SOQL to query Case records in the org to get all the RecordType values available for Case

User PNMNS
by
6.0k points

1 Answer

5 votes

Answer:

Option A and B are the correct option.

Step-by-step explanation:

Schema.RecordTypeInfo and Schema.PicklistEntry is required to demonstrate the possible information type for the Case object and list values for the Case.Status field. Both the Case object and Case.Status fields are required on the page of the visualforce. So, that's why the following options are correct.

RecordTypeInfo includes functions for getting data about the record type for a Object with related record type.

Using the function getPicklistValues returns a Schema. PicklistEntry object from the explain outcome field.

User Extrakun
by
6.1k points