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
jhelblingjhelbling 

AllowEmail field in Quote's Status picklist

Hi all,

 

Probably easy but I can't figure out ...

 

In my VF Page, I need to access the Quote allowEmail field embedded in the Status picklist (http://www.salesforce.com/us/developer/docs/api_meta/Content/meta_picklist.htm).

 

Does anybody know how to do that ?

 

The best I could find until now if the following code but it only returns me the value of the PickList ... and not this specific allowEmail field :

 

        List<SelectOption> options = new List<SelectOption>();
        Schema.DescribeFieldResult F = Quote.Status.getDescribe();
             List<Schema.PicklistEntry> Ple = F.getPicklistValues();
             for(Schema.PicklistEntry p : ple){
                options.add(new SelectOption(p.getlabel(),p.getlabel()));
p.getLabel();
             }

 

Thank you very much.

 

Best Answer chosen by Admin (Salesforce Developers) 
sfdcfoxsfdcfox

That is part of the metadata API. The full metadata API is not available to VF pages directly. You will not be able to divine the value of this field using Apex Code. Instead, you would have to use some complex client-based solution (JavaScript, Silverlight, Flex, etc). This is due to limitations in the metadata API; it is asynchronous by nature, and there is no access to decompressing ZIP files natively in Apex Code, both of which would be required to complete this task in native platform capabilities. However, you could create a client-side retrieval version and inject this data in as it becomes available, but I would think that is probably more trouble than it would be worth.