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
ryanhallmanryanhallman 

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
London BenLondon Ben

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.

What you are trying to achieve is very straight forward so as soon as you get your head around creating a controller you should have no problems.
 
Good luck!
Ben
ryanhallmanryanhallman
Thank you Ben, that seems really useful, my team and I will take a close look at it.

Ryan