Which action can the developer perform to get the record types and - ProProfs Discuss
Topics
Products
Follow Us:

Which action can the developer perform to get the record types and picklist values in the controller?

Which action can the developer perform to get the record types and picklist values in the controller?

Change Image    Delete



A developer wants to display all 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.

A. 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

This question is part of platform dev 1

Asked by Drue, Last updated: Aug 05, 2020

+ Answer
Request

2 Answers

d.Anthonyda

D.Anthonyda

Answered Jan 15, 2018

Developing programs can be a complex process that often involves a lot of mathematic formulas. If a developer wants to get record types and picklist values in the controller, display all the available record types for a case object, and display the picklist values for the case status field all while the case object and case status field are on a custom visualization field they must know what they are doing.

In this case the programer would use Schema picklist entry returned by case.status.getDescribe().getpicklistvalues(). but they would also Use Schema.RecordTypeInfo returned by Case.sObjectType...getDescribe().getRecordTypeInfos().

 

John Smith

John Smith

Answered Sep 09, 2016

Use Schema.PicklistEntry returned by Case.Status.getDescribe().getPicklistValues()2. Use Schema.RecordTypeInfo returned by Case.sObjectType.getDescribe().getRecordTypeInfos()
####
 

Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer

Email Sent
We have sent an email to your address "" with instructions to reset your password.