|
|
|
|
|
Force.com Discussion Boards :
Developer Boards :
Visualforce Development :
Re: Picklist InputField does not respect RecordType?
|
|
|
|
|

|
Picklist InputField does not respect RecordType?
|
|
gaiser
Regular Contributor
Posts: 17

Message 1 of 4

Viewed 12,436 times
|

|
Hi,
I have an object (Item__c) with picklist Status__c and two record types RT1,RT2 Status__c picklist is single-select and has following values: Value1, Value2,Value3 In record type settings I have RT1: Value1 - the only value available for Status__c RT2: Value2 - the only value available for Status__c
In my custom controller I preset Item__c.RecordTypeId in constructor such as when page is rendered I display RecordTypeId value as well as Status__c picklist as input value.
Code: ...
<apex:outputText value="{!Item__c.RecordTypeId}"/>
<apex:inputField value="{!Item__c.Status__c}"/>
... I expected that list of available values in Status__c picklist will be rendered according to the RecordType settings, i.e. if I set RecordTypeId=<ID-of-RT1> then Status__c will display Value1 *only*. But in reality it displays all values and also ignores Default value setting based on Record Type. I am certain that RecordTypeId is set correctly because I can see it on the screen. Am I doing something wrong and <apex:inputField> supposed to respect RecordType Settings or is it by design. If by design, then what is the best way to display picklist values based on RecordType settings?
|
|
|
|
08-28-2008 09:39 AM
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|