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

lookup "spyglass" in VF



I'm trying to include a lookup on a VF page. I tried the solution described here and here

but they don't work for me :( 


Here's the code


<apex:page standardcontroller="Account" tabStyle="Com_Splits__c" extensions="PartnerSplitExtension">

<apex:form id="myform">

<apex:inputText value="{!PartnerAccount.Name}" />



public with sharing class PartnerSplitExtension {

public Account getPartnerAccount(){

return [select name from account limit 1];


... Constructor and stuff 



The result is an input text box populated with the first account found in the query.


What am I doing wrong?


Many thanks in advance. 




Have you tried:


<apex:inputField value="{!Account.PartnerAccountId}"/>