+ Start a Discussion
Ankur SrivastavaAnkur Srivastava 

Single Select lightning lookup on a lightning enabled VF page

I want to create a single select account lookup field on a lightning enabled apex page. I am using SLDS lookup.It should show the current Account name when page is rendered and on click of remove button it should provide lookup to search for other accounts. Can anyone help me on this ? It's simple in a normal VF page but in lightning enabled VF I am unable to proceed. 
I have already checked this link https://developer.salesforce.com/blogs/developer-relations/2015/06/salesforce-lightning-inputlookup-missing-component.html and got the lookup component but don't know how to make it single select with current account name selected.
Nirmala  KuchiNirmala Kuchi
Hello Ankur,

Onload of page, we can populate the account name in text input and display remove icon in place of search icon. 

And implement following functionality onclick of remove icon: 

- hide remove icon and display search icon (initially search icon will be hidden).
- set input text value to blank and focus cursor on it, so that users can search and select the record.

Hope this helps!

Thanks,
Nirmala