+ Start a Discussion

How to get allowable picklist values using query for type field in campaigns table

Hi All;
          I have one combo box in my program from which user selects the campaign type.(Here Type is nothing but the Type field in campaigns table).after selecting the campaign type I am displaying all the campaigns of the selected Type.
            Now this type field is a picklist itself.I want to show all values of the Type picklist in the combo box but I am not able to find the table from which I can find out all allowable values for Type picklist.Remember that type picklist is updatable so I can not hardcode the values for combo box.
Can anyone tell me how to get all allowable picklist values for the Type field in campaigns table.
Thanx in advance
Gareth DaviesGareth Davies
           DescribeSObjectResult pObjectDescription
           Field pFld = pObjectDescription.fields[i]
           PicklistEntry[] vals = pFld.picklistValues;
                    PicklistValues = new string[vals.Length];
                    for (int i = 0; i < vals.Length; i++)
                       PicklistValues[i]= vals[i].label;
                     ///Handle Error 

Hope that helps