Which two actions should the developer perform to get the available - ProProfs Discuss
Topics
Products
Follow Us:

Which two actions should the developer perform to get the available picklist values and record types in the controller? 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.



A. Use Schema.RecordTypeInfo returned by RecordType.SObjectType.getDescribe().getRecordTypeInfos().
B. Use Schema.PicklistEntry returned by Opportunity.SObjectType.getDescribe().getPicklistValues().
C. Use Schema.PicklistEntry returned by Opportunity.StageName.getDescribe().getPicklistValues().
D. Use Schema.RecordTypeInfo returned by Opportunity.SObjectType.getDescribe().getRecordTypeInfos().

This question is part of Salesforce Developer 1 2019
Asked by Pjazurin, Last updated: Jul 12, 2020

+ Answer
Request

3 Answers

Supersharp

Supersharp

Answered Jul 06, 2019

I think the correct answer for StageName is

Use Schema.PicklistEntry returned by Opportunity.StageName.getDescribe().getPicklistValues().

2
 

Joao Rosa

Joao Rosa

Answered Aug 23, 2019

Use Schema.PicklistEntry returned by Opportunity.StageName.getDescribe().getPicklistValues().

https://developer.salesforce.com/forums/?id=906F0000000D6l3IAC

 

pjazurin

Pjazurin

Answered Jul 01, 2019

Use Schema.PicklistEntry returned by Opportunity.SObjectType.getDescribe().getPicklistValues().
Use Schema.RecordTypeInfo returned by Opportunity.SObjectType.getDescribe().getRecordTypeInfos().
1
 

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.