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

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.
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!).

A more direct route:

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