function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Roshan TamrakarRoshan Tamrakar 

Getting Picklist Values in Controller

I want to get all 'Priority' and 'Status' picklist values on Case object in my Controller Class. How do I get them? I found CaseStatus object in Apex Explorer which contains all statuses but couldn't see for the Priority.

Thanks,
Roshan
Ron HessRon Hess
describing the field values is a feature that is announced for Summer 08, it will be done by describing the case object in apex code.

coming soon.
MikeGoelzerMikeGoelzer
Hi Roshan, I think there's a two-line sample you'll like near the top of page 111 in the Apex Language Reference for Summer '08. 

http://wiki.apexdevnet.com/index.php/Apex_and_Visualforce -> Apex -> Apex Resources -> Pre-Release Preview for Summer '08 -> PDF

Schema.PicklistEntry and so on.  The preceding ten pages are pretty good too (record type information -- woo hoo!).

Mike
MikeGoelzerMikeGoelzer
A more direct route:
 http://www.salesforce.com/us/developer/docs/apexcodepre/Content/apex_dynamic_fields_describe_methods.htm


Message Edited by MikeGoelzer on 05-12-2008 08:33 AM