You need to sign in to do that
Don't have an account?
Reference a Lookup or master field twice on a single page
Hi,
I am trying to create a visual force page that will have two fields Source and Destination but they both reference the same back end master/detail field. This page uses Opportunity as the standard controller and the child table/object as the extension. I want the user to be able to select Opp A in the source field and Opp B in the dest field for example. This seems to work fine. I cannot seem to get any controller action to occur using the onchange event so I am thinking I could get around this with an additional button named MOVE.
How can I reference both of the different values in these two fields from my controller when they have a VALUE setting that is the same? Below is some of the main code snippet around the VF page.
<apex:page StandardController="Opportunity" Extensions="Enrollment_MoveLatestEnrollContr2" id="Page" tabstyle="Opportunity"
sidebar="false" showHeader="false" title="Move Latest Enrollment" >
<apex:sectionHeader title="Move Latest Enrollment" subtitle="Move Latest Enrollment" />
<apex:form id="myForm">
<apex:pageMessages escape="false" />
<apex:PageBlock id="pbSrceDest" rendered="{!isAdmin}">
<apex:pageBlockSection columns="1" title="Select a Destination Opportunity" collapsible="false" >
<apex:inputField id="SourceOpp" label="Source Opportunity" value="{!Enrollment.Opportunity__c}" />
<apex:inputField id="DestOpp" label="Destination Opportunity" value="{!Enrollment.Opportunity__c}" />
</apex:pageBlockSection>
...
...
Thanks in advance for your assistance:)
<apex:inputField id="SourceOpp" label="Source Opportunity" value="{!Enrollment.Opportunity__c}" />
<apex:inputField id="DestOpp" label="Destination Opportunity" value="{!Enrollment2.Opportunity__c}" />