1

I have this visualforce page where I show several fields as inputfield and picklist which are working fine. I cannot get the inputcheckbox showing up in my visualforce page am I missing something see my code below:

<apex:repeat value="{!accList}" var="a">
 <apex:pageBlockSection id="section1" title="{!a.name}" columns="5" onclick="document.getElementById(‘{!$Component.section1}’).childNodes[0].childNodes[0].click();">  
   <script>twistSection(document.getElementById(“{!$Component.section1}').childNodes[0].childNodes[0]);document.getElementById(“{!$Component.section1}').childNodes[0].style.cssText = “cursor:pointer;' </script>
    <table style="width:50%;">
        <apex:repeat value="{!a.Contacts}" var="c"> 
          <tr>
            <apex:pageBlockSection title="{!c.lastname}"  collapsible="false" columns="9" showHeader="false" id="j1">  
                <td style="text-align:right;width:35%;font-weight:bold;font-size:11px;color: #4a4a56;padding-right: 2px;">
                    <apex:inputField value="{!c.lastname}"/>
                    <apex:inputField value="{!c.firstname}"/>
                    <apex:inputField value="{!c.Phone}"/>   
                    <apex:inputField value="{!c.LeadSource}"/>
                    <apex:inputCheckbox value="{!c.DoNotCall}"/> 
                  <apex:commandButton value="Update Contact" action="{!updateContacts}" rerender="contactList">
                     <apex:param name="contactIdent" value="{!c.id}" assignTo="{!chosenContactId}"/>
                  </apex:commandButton>
                 </td>                            
              </apex:pageBlockSection>
           </tr>
         </apex:repeat>
     </table>        
   </apex:pageBlockSection>
 </apex:repeat>
</apex:pageBlock>

1 Answer 1

1

The Contact.DoNotCall field is normally turned off at the "Field-Level Security" level in profiles including the "System Administrator" one. Visualforce respects these field settings by not rendering the field.

Check the "Read Access" and "Edit Access" checkboxes in the "Field-Level Security" settings of each profile that you want this page page to work under (including the "System Administrator" one).

1
  • @Jenssen I've been stuck on the same problem myself; kinda weird the field is there but turned off in the profiles.
    – Keith C
    Commented Sep 3, 2017 at 17:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .