Skip to main content
Hello!

I am not a developer, but I'm trying to do developing (stupid me!)

I am trying to create a visualforce page that shows Contact information as a related list on Opportunities. Below is the code that I've been working on. 

<apex:page standardController="Opportunity" sidebar="false" doctype="html-5.0">

  <apex:input value="Contact"/> 

   <apex:pageBlock title="Main Contact Info">

         <apex:pageBlockSection >

           Contact First Name : {!Contact.FirstName}<br/>

           Contact Last Name : {!Contact.LastName} <br/>

           Preferred Contact Time : {!Contact.Preferred_Contact_Time__c} <br/>

           Inquiring For : {!Contact.Inquiring_For__c} <br/>

           Interested In : {!Contact.Interested_In__c} <br/>

           Number of Listings : {!Contact.Number_of_Listings__c} <br/>

           Number of Agents : {!Contact.Number_of_Agents__c} <br/>

           Number of Offices : {!Contact.Number_of_Offices__c} <br/>

          </apex:pageBlockSection>

    </apex:pageBlock>   

</apex:page>

This is the error I receive: Attribute value in <apex:input> must contain only a formula expression that resolves to a single controller variable or method in ContactRelatedList at line 2 column 32

I have no idea what this means. I've been googling, but can't seem to figure it out. Help!
18 respostas
  1. 29 de jun. de 2018, 16:58

    <apex:pageBlockTable> instead of <apex:dataTable>

     

    <apex:page standardController="Opportunity" sidebar="false" doctype="html-5.0" extensions="OppContacts">

    <div style="overflow: scroll; height: 300px;">

    <apex:pageBlock title="Pardot Contact Info">

    <apex:pageBlockSection columns="1">

    <apex:pageBlockTable value="{!myOppContacts}" var="cnt">

    <apex:column headerValue="Preferred Contact Time" value="{!cnt.Preferred_Contact_Time__c}"/>

    <apex:column headerValue="Inquiring For" value="{!cnt.Inquiring_For__c}"/>

    <apex:column headerValue="Interested In" value="{!cnt.Interested_In__c}"/>

    <apex:column headerValue="Number of Listings" value="{!cnt.Number_of_Listings__c}"/>

    <apex:column headerValue="Number of Agents" value="{!cnt.Number_of_Agents__c}"/>

    <apex:column headerValue="Number of Offices" value="{!cnt.Number_of_Offices__c}"/>

    </apex:pageBlockTable>

    </apex:pageBlockSection>

    </apex:pageBlock>

    </div>

    </apex:page>

     
0/9000