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
SFDCU$erSFDCU$er 

Visualforce Page custom look up

I have used this blog post as a reference to create a custom look up visualforce page http://bobbuzzard.blogspot.com/2010/09/visualforce-lookup.html Now I have a requirement which says that I have to populate another field based on the selected look up value.

In the above mentioned blog, using the look up text field Account Name is getting populated. Now based on the selected look up value I also want another field Account Number to be auto populated. Any help would be appreciated.
bob_buzzardbob_buzzard
In a nutshell you have to submit the form after the lookup is populated and query the fields you need back from the database.

There's another post on my blog that covers this:

http://bobbuzzard.blogspot.co.uk/2011/11/retrieve-related-object-fields.html

As you are using my custom lookup, you won't be able to use the actionsupport to post the form back, instead I'd create an actionfunction and execute that from the closeLookupPopup() JavaScript method.