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

View when using a lookup

When using a lookup field, it pops up a search window that allows me to search for a record and has a few record choices in there.  For example, if I had a relationship between Contact and Account and I clicked on the lookup field in a Contact record to relate an Account to it, it would give me a popup window showing me a few Account choices and also allow me to search for an account.  My question is can I change this window and if so how can I do so.  I want to be able to show all accounts in the window and also change the view so the user can see more information about an account record than just the Name.

I don't know if there's a way to directly change the way the page works, but I believe the "few" that it shows you are either somehow related to the account in question or they are from the recently viewed list.


There is defintely some customization you can do as far as the lookup dialog goes, specifically if you go to Setup -> Customize -> Account -> Account Search Layouts there is a section for lookup dialogs that allows you to change which columns are displayed there.


Hope this helps. 

To your second question about controlling what columns show up, you can do that if you go to Setup->Customize->Search and turn on enhanced lookups for the Account object.  Then you'll get a lookup where you can configure the columns.
But you can't show all accounts in that window.  It doesn't work that way, and it wouldn't be terribly scalable if it did.
I understand it would be poor in terms of scalability but that just seems stupid to me that you cant change the view for the lookup.  Showing all accounts pagenated by 10 or 25 would be great and would handle the scale issue.
...except on the server side.  If you have 2 million accounts, then it would have to do a massive query and sort that query by something to paginate it.  That's actually what I was referring to that doesn't scale.  Well, that and the fact that showing all accounts in that manner is not very useful when you have 2 million accounts.
Good point. 

We have the same requirement, and what we need is to show 25 or 10 records in each page, for left, we can see them by clicking the "next "button, but i did not find a way to realize this.