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
mavsmavs 

question on Lookup field

Can we display a lookup field without Account Name being populated in the textbox?

 

 

We are grabbing Accountid from Contact Object. Account Name is being populated in the lookup textBox when the component is rendered. Can we remove Account name being populated in the lookup field when the page is rendered?

 

 Please advise

 

<apex:inputField value="{!con.Accountid}"/>

 

lookup 

 

we just need the LookUp field with empty TextBox

Best Answer chosen by Admin (Salesforce Developers) 
Anand@SAASAnand@SAAS
Set the value of the "AccountId" to "null" in your controller.