• ohm
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

I'm looking for some help, either code samples or documentation to point me towards that can help me achieve this. On an existing VF page, we are currently dislpaying Proposal__c record data and we are exposing and collecting data already.

 

What I need now is to be able to select a Contact, whose Account is associated to that record - in a picklist form or list form (most of our accounts for this purpose are <50 contacts).

 

On each Proposal__c is a Vendor__c (Contacts lookup). So basically, i need some help constructing the SOQL query to return the list of other Vendors (Contact lookup) associated to that Account. The user will basically be able to save to the record, one other contact. I'm not sure if a picklist or lookup is going to be easier in this scenario. 

 

Relevant code below:

<apex:page standardController="Proposal__c" extensions="ProposalExtension" tabStyle="Proposal__c" cache="false">
    <apex:pageMessages id="pageErrors"></apex:pageMessages>
    <apex:sectionHeader title="New Award"/>
    <apex:form id="awardForm">
        <apex:pageBlock title="Bid Detail" id="awardBlock" mode="edit">          
            <apex:pageBlockButtons >
                <apex:commandButton value="Send LOE" action="{!sendLOE}"/>
                <apex:commandButton value="Cancel" action="{!cancel}"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection title="Bid Information" columns="2" collapsible="false" showHeader="false">
                <apex:outputField value="{!bid.Vendor__r.Name}"/>        <apex:outputField value="{!bid.Bid_Date__c}"/>  
                <apex:outputField value="{!bid.Bid_Amount__c}"/>         <apex:outputField value="{!bid.Bid_Deliver_By__c}"/>  
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Award Information" id="results" columns="2" collapsible="false">     
                <apex:inputField value="{!bid.Award_Amount__c}" required="true"/>        <apex:inputField value="{!bid.Awarded_Date__c}" required="true"/> 
                <apex:inputField value="{!bid.Award_Deliver_By__c}" required="true"/>    <apex:inputField value="{!bid.Award_Comments__c}"/> 
            </apex:pageBlockSection>          
        </apex:pageBlock>      
    </apex:form>
</apex:page>

 

 

  • January 13, 2012
  • Like
  • 0