You need to sign in to do that
Don't have an account?
Manish Anand 10
Create a contact and associate with an account in visualforce and apex
Hi,
My requirement is to create a button/link on account detail page on the first visualforce page.Clicking on that button should open second visualforce page, which will have Account Name (from First visualforce page) and 'Add New Contact'. button.Clicking on 'Add New Contact' will open third visualforce page, where I can enter Contact's first name and last name and save the contact.
Newly created contact's account name will be same as that of Account name from first visualforce page.
Regards,
Manish
My requirement is to create a button/link on account detail page on the first visualforce page.Clicking on that button should open second visualforce page, which will have Account Name (from First visualforce page) and 'Add New Contact'. button.Clicking on 'Add New Contact' will open third visualforce page, where I can enter Contact's first name and last name and save the contact.
Newly created contact's account name will be same as that of Account name from first visualforce page.
Regards,
Manish
1) Create a VF page for Account - should use <apex:page standardController="Account">
2) Create a VF page for Contact - should use <apex:page standardController="Contact">
3) Create the custom button on standar account detail page to launch the 1) VF page.
Feel free to post questions if you run into issues.
As a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer a thumb up if that answer is helpful to you.
Thanks