Which two actions should the developer perform to get the available - ProProfs
     

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

+ AnswerRequest Answer
...

3 Answers

Supersharp

Supersharp

Answered on Jul 06, 2019

I think the correct answer for StageName is

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

Joao Rosa

Joao Rosa

Answered on Aug 23, 2019

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

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

pjazurin

Pjazurin

Answered on Jul 01, 2019

Use Schema.PicklistEntry returned by Opportunity.SObjectType.getDescribe().getPicklistValues().
Use Schema.RecordTypeInfo returned by Opportunity.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.