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
jaxdmasterjaxdmaster 

Lookup field

Hi All,

 

I have a custom controller and visualforce page. On that page I have to show lookup for selecting users which belongs standard profile only. I am able to generate lookup but it show users of all profiles. How can fix it?

 

 

Thanks

Shashikant SharmaShashikant Sharma

You have to open a custom lookup page. Even filter lookup only works on native page layouts. So no other option for you. One easy way could be that you may allow ser to select any but before saving the data you can validate in contrlller class. But in this case you will not stop showing users other than of standard profile.

 

To create custom lookup page :

You can see this

http://bobbuzzard.blogspot.com/2010/09/visualforce-lookup.html