You need to sign in to do that
Don't have an account?

displaying all the picklist values through visualforce page irrespective of record type
We have a requirement where we need to access all the picklist values through a visual force page irrespective of the record type.
Hereis the sample code :
<apex:page standardController="Opportunity">
<apex:form>
<apex:InputField value = "{!Opportunity.DeliveryInstallationStatus__c}"/>
</apex:form>
</apex:page>
It is displaying only the picklist values of my default record type. I want all the picklist values of that field.
Please let me know how to achieve that...
One way to achieve this is to create your own selectlist that contains each value from the picklist. You can create a selectoption per picklist value as follows - this assumes the object is called My_Custom__c and the field is Status__c
Thank you but cant we achieve it using input field itself. As I can see this behaviour in one of our sandboxes but the developer who has developed that has left the company and we are not sure of how he did it. The same piece of code is displaying all the picklist values in one sand box and in the other sandbox it is displaying only the picklist values available for the default record type. We tried hard but we couldnt figure it out . We compared the values available to the record types in both the sand boxes and other comparisions. They are both same but still I see they are behaving differently in two different sandboxes. Is there any config or admin change which will allows to take all the picklist values . They must have done some thing special to over come the recordtype restriction. pls suggest.
Hi Bob, I hope you're well.
I was wondering, for the process outllined below do you know if it's still the best approach or as it was from 2011, if a more up-to-date approach would be better? Also using the approach provided, if I debug "statField.getDescribe()" the following is returned
Schema.DescribeFieldResult[getByteLength=240;getCalculatedFormula=null;getController=null;getDefaultValue=null;getDefaultValueFormula=null;getDigits=0;getInlineHelpText=null;getLabel=Billing Country;getLength=80;getLocalName=BillingCountry;getName=BillingCountry;getPrecision=0;getRelationshipName=null;getRelationshipOrder=null;getScale=0;getSoapType=STRING;getSobjectField=BillingCountry;getType=STRING;isAccessible=true;isAutoNumber=false;isCalculated=false;isCaseSensitive=false;isCreateable=true;isCustom=false;isDefaultedOnCreate=false;isDependentPicklist=false;isDeprecatedAndHidden=false;isExternalId=false;isFilterable=true;isGroupable=true;isHtmlFormatted=false;isIdLookup=false;isNameField=false;isNamePointing=false;isNillable=true;isPermissionable=true;isSortable=true;isUnique=false;isUpdateable=false;isWriteRequiresMasterRead=false;]
however fieldDesc.getPicklistValues() is empty.
Could there be a setting which affects returning picklist values to an apex class?
Thanks in advance.