0

Currently i am using MailingCountry(Standard Contact field under mailing address) on my VF page in customer portal but it is rendering as input field instead of picklist, as i have enabled State and Country Picklist feature in my org. What's the reason for that? In native salesforce environment it is working correctly but in customer portal it's not working.

 <apex:pageBlockSectionItem rendered="{!LOWER(f.fieldPath) == 'mailingcountry'}">
       <apex:outputLabel value="Country" />

       <apex:inputField label="Country" styleClass="country"
       style="width:150px;" value="{!student.mailingCountry}" 
       required="{!OR(f.required,f.dbrequired)}" />                                                                     
 </apex:pageBlockSectionItem>

This is the code for VF page

<apex:page standardController="Contact">
 <apex:form>
  <apex:inputField value="{!contact.MailingCountry}"/>
 </apex:form>
</apex:page>

It is also not showing up in simple VF page in salesforce Envronment.

1

Try using value="{!contact.MailingCountryCode}" in your apex:inputField.

| improve this answer | |
0

without seeing code i'm kind of firing in the dark here, but i'm going to guess that you've included the field on your vf page as an Apex:inputText field, rather than an Apex:InputField Field?

| improve this answer | |
  • Plz check out the code i have added!! – Pankaj Oct 3 '13 at 10:41
  • just read over here: help.salesforce.com/… that State and country picklists don't work with partner portals. While I realize that Partner Portals and Customer Portals are different, they are similar enough that I suspect you may be hitting a limitation of the feature. – Kevin P Oct 3 '13 at 10:45
  • It is also not working on VF page in salesforce environment. Please check the code i have added. – Pankaj Oct 3 '13 at 11:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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