Proj_UK
Proj_UK

Reputation: 157

Salesforce: Auto-complete for Lookup field

I have a custom object known as "Companies".I have created a lookup field in a Visual Force page which gives me the list of companies name from the custom object " Companies".I have written a code which makes this lookup field auto-complete like what you have seen in the image attached.(First pic)

The problem: I don't know how to make the lookup field (which takes the list of companies name from custom object" Companies" in "Opportunities" standard object) auto-complete as done in the visual force page. Basically want the field highlighted in yellow in the second picture to auto-complete or give relevant suggestion when I type the first few characters.

Any help on this matter would be appreciated. Thank you

This is a Visual Force page where I have done auto-complete for a look up field This is standard Opportunity object, where I want to make the yellow highlighted lookup field to be auto-complete but I don't know how to do in a standard page

Upvotes: 0

Views: 5426

Answers (3)

Don Schueler
Don Schueler

Reputation: 11

This is what you want - http://tapp.ly/autocomplete/

Autocomplete Lookups for Salesforce enables any Salesforce Lookup field to support autocomplete suggestions. Autocomplete Lookups helps your users enter lookup fields reducing data entry tasks and error rates.

Salesforce records suggested as you start typing Search All fields (Standard Salesforce Lookups only let you search by the Name field) Results can show any field (E.g. Case Subject rather than Case Number)

Upvotes: 1

JPK
JPK

Reputation: 45

Have you tied enabling Auto Complete for your custom object the search page?

Click Your Name | Setup | Customize | Search | Search Settings. Check the Lookup Auto-completion check box for your object.

This will give you auto-complete options for recently used items. http://help.salesforce.com/help/doc/en/search_lookupdialog.htm#auto_complete

Upvotes: 2

JCD
JCD

Reputation: 2231

You will not be able to embed this customization into a standard page layout like you're using for the Opportunity object in your second screenshot. If that auto-complete is a must-have, then you really only have two options:

  • Replace the entire Opportunity page layout with a custom VF page
  • Write a VF component with just the Company lookup field in it and embed it into your Opportunity page layout (this will have to be in its own section, which probably won't look as nice)

Upvotes: 1

Related Questions