Visualforce Development
Sign In  ·  Help
Jump to Page:   1
  Reply   Reply  

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


gaiser

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

All Users' Tags:

 
  Reply   Reply  

Re: Picklist InputField does not respect RecordType?
Options    Options  
Moderator jwetzler
Moderator
Posts: 696


jwetzler

Message 2 of 4

Viewed 12,434 times


InputField does not currently support recordTypes, but it is on the roadmap.

 

Jill Wetzler
Lead Visualforce Developer - salesforce.com
Check out the developer documentation | Got an idea?
08-28-2008 10:04 AM
 
  Reply   Reply  

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


gaiser

Message 3 of 4

Viewed 12,406 times


Many thanks for clarification, really helpful.
08-29-2008 12:39 AM
 
  Reply   Reply  

Re: Picklist InputField does not respect RecordType?
Options    Options  
jeffdonthemic
Regular Contributor
Posts: 138


jeffdonthemic

Message 4 of 4

Viewed 9,064 times


Jill,

Any idea when this might be implemented? We currently have 400+ recordtypes and the fact that inputField do not support recordTypes severely limits our use of Visualforce page. We've had to revert back to S-Controls in some cases.

Thanks
Jeff Douglas
Informa Plc
10-23-2008 07:31 AM
 
Jump to Page:   1