Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

I created VF page with a Multi - picklist field using <apex:inputField value="{!obj.Hobbies__c}" />

But the values in VF page Multi - picklist showing the different values compare with values in the object field. I got a record types in this object as well.

<apex:page controller="controllerClass">
  <apex:form > 
      <apex:image value="{!$Resource.Logo_Medium}" style="height:150px;width:150px;" rendered="{!Logo}"/>
      <apex:image value="{!$Resource.Logo_Transparent}" style="height:67px;width:337px;" rendered="{!InLogo}"/>
       <apex:pageBlock mode="edit" title="Lead Edit">
       <apex:pageBlockButtons > 
          <apex:commandButton value="Save" action="{!dosave}"/>
          <apex:commandButton value="Cancel" action="{!doCancel}" immediate="true"/>
       </apex:pageBlockButtons>
          <apex:pageBlockSection title="Information" columns="2"> 
              <apex:pageblocksectionitem >
                  <apex:outputlabel value="{!$ObjectType.Lead.Fields.FirstName.label}"> 
                  </apex:outputlabel>
                     <apex:outputpanel >
                         <apex:inputfield value="{!lead.Salutation}" ></apex:inputfield>
                         <apex:inputfield value="{!lead.FirstName}" ></apex:inputfield>
                     </apex:outputpanel>
              </apex:pageblocksectionitem>
              <apex:inputField value="{!lead.LastName}"/>
              <apex:selectList label="Campaign" size="1" value="{!CampaignName}" >
                  <apex:selectOptions value="{!ActiveCampaign}" ></apex:selectOptions>
              </apex:selectList>
              <apex:inputField value="{!lead.Street}"/>
              <apex:inputField value="{!lead.LeadSource}" />
              <apex:inputField value="{!lead.City}"/> 
              <apex:inputfield value="{!lead.PostalCode}"></apex:inputfield> 
              <apex:inputField value="{!lead.Phone}"/> &nbsp;
              <apex:inputField value="{!lead.MobilePhone}"/> &nbsp;
              <apex:inputField value="{!lead.Email}"/>
              <apex:inputField value="{!lead.hobbies__c}"/> // multiPicklist 
          </apex:pageBlockSection>
     <apex/page:block>
  </apex:form>

share|improve this question
    
Please put some code here. –  mast0r Dec 12 '12 at 9:50
    
If I recall correctly picklists will respect recordtype selections if you'll add it (as <apex:outputField>) to the page, can you try it? If you'll add it as inputField you might have to rerender the page for the picklist to "refresh" itself though –  eyescream Dec 12 '12 at 9:52
    
placed some code <apex:inputField value="{!lead.hobbies__c}"/> // multiPicklist –  rakesh Dec 12 '12 at 10:00

1 Answer 1

up vote 1 down vote accepted

The first idea i've got is that you are reading the picklist values, not labels toLabel(Hobbies__c).

share|improve this answer
    
yeah, the values i given in object are different to the values displaying on vf page –  rakesh Dec 12 '12 at 10:05
    
Lets say you've entered values like '1,2,3,4,5' to the objects picklist. At your VF page you will get the same values unless you create translations for that values in the translation workbench. –  mast0r Dec 12 '12 at 10:21
    
Okey i entered values like '1,2,3,4,5' to the objects multi-picklist. In Vf page getting the different values 'level a,level b,level c,level d,level e'. and their are some record types to this object –  rakesh Dec 12 '12 at 10:31
    
1. Check the translations for that picklist 2. Go to the object and check your record type - you can define which values for which record type must be shown –  mast0r Dec 12 '12 at 10:36
    
values are defined to record types but i am unable to display those values in vf page –  rakesh Dec 12 '12 at 10:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.