You need to sign in to do that
Don't have an account?
ryanhallman
So that a user could type a name text string in from the Accounts page, and then click the button, and a new contact will be created for them under this account, and they will return to the accounts page.
Simple question from a visualforce newbie...
Hi All,
I've been looking at Visualforce, it looks very very cool, I'm excited about the prospects.
I wanted to create a simple page, it seems from my limited knowledge that it would be based on the standard controller 'Account'.
But I want to have an extra section just below the Contacts related list detail, that has an input field "Contact Name" and a button that has, Create New Contact.
So that a user could type a name text string in from the Accounts page, and then click the button, and a new contact will be created for them under this account, and they will return to the accounts page.
Can I do this with the standard controller? Or do I need a controller extension off the Accounts page which has a method to create a new Contact?
Any advice would be greatly appreciated.
Ryan
Hello Ryan,
Take a look at http://www.salesforce.com/us/developer/docs/pages/index.htm
There is an example here (in Getting Started/A Quick Start Tutorial/Creating a Wizard) of what they call an 'opportunity wizard' which essentially creates an account + contact + opportunity all from one page.
I think if you poke around in here it will give you a pretty good idea of how you can create a controller which will access multiple objects.
Ryan