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
jucuzoglujucuzoglu 

Visualforce Controller not returning all Picklist Values

I have an object with a dependent picklist.

 

//Dummy record used for the picklist fields on the VF page.
public Recruitment_Cycle__c cycle {
	get {
		if(cycle == null) cycle = new Recruitment_Cycle__c();
			return cycle;
	     }
	set;
	}

 Its called in this code on the VisualForce page

 

<apex:inputField value="{!cycle.Stage__c}" required="true" />
<apex:inputField value="{!cycle.Status__c}" required="true"/>
<apex:inputField value="{!cycle.Second_Rd_City__c}" required="true"/>

 The problem is the Stage variable only shows 10 of the values however there should be 21 available options. The Status is dependent on the Stage and so far as I can see the statuses show up properly based on the currently selected Stage.

 

Any idea on what might be causing 11 of the values not to display?

Best Answer chosen by Admin (Salesforce Developers) 
RadnipRadnip

Is it because the particular opportunity your looking at / creating doesn't have those picklist options in the sales process/record type.

All Answers

RadnipRadnip

Is it because the particular opportunity your looking at / creating doesn't have those picklist options in the sales process/record type.

This was selected as the best answer
RadnipRadnip

Opp sorry only quickly read it its not an opportunity :) so won't be a sales process..

jucuzoglujucuzoglu

Dataville, you did hit on something that I think brought me to the right answer.

 

There are multiple record types for this object and the default record type does not include those options. (and no RecordTypeId was being set). Once I set the RecordTypeId properly problem solved :)

 

Thank You for your help.