During a recent conversation on twitter this question popped up again. Is it possible to auto-populate the values on a visualforce page on choosing a lookup? Let’s say you are designing a custom contact manager page. The page contains 4 fields from Account on the page including a lookup. When the user chooses an account value from lookup he would like to see the other 3 fields automatically populated,
Sample visualforce code-
The auto-populate controller is as follows-
You can use any object that is related to populate the code.