You need to sign in to do that
Don't have an account?

populating contact list based on account lookup
Hello,
i am currently trying to create a Visualforce page which extends the "Send an Email"-functionality.
What I would like to do is create a lookup field for an account and then automatically populate a selectList with the related contacts to that account.
Is this in any way possible? The most challenging thing is assigning the selected account to a variable to query the list of contacts from it. Everything else should be fairly basic stuff.
Maybe someone has a hint for me.
Regards,
hoomel
See this example and use the code ,
Controller
VFP
let me know with you results.
All Answers
See this example and use the code ,
Controller
VFP
let me know with you results.
Thank you, that helped me a lot.
It has a little flaw as you posted it, as I get an Unknown Property 'VisualforceArrayList.Name' error on the contact list. When I remove the .Name it shows the correct number of objects, but it does not seem to get through to the name.
But this is not a problem for me, since I need to create a new SelectOption from the resulting contacts anyway.
Thanks again for your help!
Your Welcome Mate
hello,
I'm a noob to VP and I'm trying to change your code a little so that when I click a button I get the contacts from the Account ID entered in the text field. Can I just use the standard controller, how to invoke this?