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
admin12344555admin12344555 

Can we override the User lookup icon in a standard page

Is it possible to filter the users when we click the lookup icon on a USER object based on logged in user. For example, When Sales Director login, want to show only sales representatives who falls under him when i click User lookup icon button in a standard Lead Transfer page. Is there any possible way to override the lookup Icon button on a standard page. When I click lookup Icon a VF page need to open. Thanks in advance.
jkucerajkucera

You can't override the standard lookup functionality.  You could try to custom build something, but it is probably more trouble than it's worth as it would involve something like this:

  • Create a button "Change Ownership" (note I dont' think you can hide the link, so this would be confusing to users)
  • Create a new VF page that populates a list of users that report to the clicking user
  • Let them click one to select
  • Have a "submit" action that reassigns the lead