function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
s-Forces-Force 

Multiple LookUp Fields on one page

UntitledscreenHello Everyone.

 

i am facing some problem in multiple lookup field on single visual force page. i want to pass one lookup field on single visual force but in different pageblocktable columns. Firstly am getting error that its overriding the value of lookup field. i solved that now its not overriding value of other but in one column. when i goes to secong column its again overriding the value with 1st one. i.e. i have to create different id for each column. but problem is how to pass value of different id in same pageblocktable. i don't want to create different pageblock table for each column. and how do i save that different id's?????

 

if anyone know solution for this pls help me out. or if you have any other solution for the same i.e. multiple lookup field on same page then pls post code for the same. Please revert for the same if anyone knows.

 

Screenshot:





 

 

 

 

Thanks In Advance...

 

 

Pradeep_NavatarPradeep_Navatar

Use pageblocksection, If you face problem by assigning the id in different columns. You can try with <apex:repeat>     component for generating dynamic id's.

 

            <apex:pageblock>

                       <apex:pageBlockSection title="Occurrence Information" columns="2">

                       <apex:pageBlockSectionItem >

                                          <apex:outputLabel value="Record ID" for="inFldN" />

                                          <apex:inputField value="{!Recurrence__c.Name}"/>

                       </apex:pageBlockSectionItem>

                       <apex:pageBlockSectionItem >

                                             <apex:outputLabel value="Volunteer Opportunity" for="inFldVO" />

                                             <apex:inputField value="{!Recurrence__c.Volunteer_Opportunity__c}"/>

                        </apex:pageBlockSectionItem>

                        </apex:pageBlockSection>                                            

            </apex:pageblock>

 

Hope this helps.