4

I am rendering a VF page in Customer Portal and hoping to use inputField. Issue is that the field is not showing as editable, this happens when rendered from the portal (as a portal user) and my in my force.com app, see code below.

<apex:page sidebar="false" standardController="Contact">
    <apex:form >
    <h1>Hello, {!$User.FirstName}</h1>
        <apex:pageBlock title="PP Form" mode="edit">
            <apex:pageBlockSection title="Personal Details">
                <apex:inputfield value="{!contact.name}"/> 
                <apex:inputfield value="{!contact.name}"/> 
            </apex:pageBlockSection>
            <apex:pageBlockSection >
                <apex:commandButton action="{!save}" value="Save"/>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

Thanks in advance

  • This sounds like a permissions issue. – Matt K Aug 24 '12 at 20:55
  • I'm not sure if you meant to or not but the title of your question implies the mode="edit" attribute on apex:pageBlock changes the functionality of inputFields within it. It does not. It only controls what styles are used when rendering. – ca_peterson Aug 25 '12 at 4:00
3

Are you referring to: Customer Portal User Licenses or Service Cloud Portal User Licenses depending on the user licenses, some users don't have have access to update contacts, make sure your using a license that has access to 'Contacts' here: https://na3.salesforce.com/help/doc/en/users_understanding_license_types.htm

  • Thanks Jordan, I am referring to Customer Portal User Licenses. I double checked the link and it seems the license type I am using (Customer Portal Manager Custom license) allows for create, read and update. Not sure what the issue is, but I am gonna try add the VF page to the page layout and see how it behaves then. – Mahat Hussein Aug 24 '12 at 22:02
  • 2
    Not positive that Contact has a 'Name' record, but maybe try: {!Contact.FirstName} & {!Contact.LastName} – jordan.baucke Aug 24 '12 at 22:09
  • You are a legend Jordan - Thanks that did the trick. As the say in the UK, SchoolBoy Error – Mahat Hussein Aug 27 '12 at 20:17
8

Name is a read-only field that's basically FirstName and LastName concatenated. Try this with either of those fields, and make sure that the profile has Field Level access to those fields.

  • 1
    This is correct. Name is definitely not editable as it is just a concatenation of FirstName + ' ' + LastName. – Peter Knolle Aug 24 '12 at 23:50

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.