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
Rocks_SFDCRocks_SFDC 

How to create a filtered lookup in Visualforce Page

Hi ,

 

I have a requirement where we need to show a lookup field with a filter criteria to show Accounts in a vf page on lead Object.The field does not exist in lead object.Can anyone please suggest me how to create a filtered lookup field on VF Page.

 

 

Any help would be highly appreciated

 

Thanks in Advance

 

souvik9086souvik9086

You can add Look Up filters in the object level.

Go to the lookup field -> Lookup filter -> Show Filter Settings

 

then you can add filters.

 

If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.

Thanks

Avidev9Avidev9
Have a look at this salesforce link http://login.salesforce.com/help/doc/en/fields_lookup_filters_defining.htm

This explains the every step involved
Rocks_SFDCRocks_SFDC

This link describes how to create a lookup filter.My question is creating a lookup in vf page with filter criteria.This field does not exist at object level.We have to just show it vf page.

 

 

Thanks,

 

Avidev9Avidev9
Have a look here http://blog.jeffdouglas.com/2011/08/12/roll-your-own-salesforce-lookup-popup-window/

You can customize this code by changing the query according to your filters.
Mike ArthurMike Arthur
I interpret the question not as 'how do I create a filtered lookup' but how do I get the filtered lookup to work when added to a VF page'.

Samuel has answered it here:
https://salesforce.stackexchange.com/questions/11709/why-doesnt-lookup-filter-work-on-visualforce-page