+ Start a Discussion
honda57honda57 

Add to Account - Custom Button

I would like to add a button to my Contact object that allows me to select contacts from a list view and add them to an account.   This is VERY similar to the "Add to Campaign" button that already exists.

 

Has anyone done this?  How do I make it happen as I can't get to the code behind the "add to Campaign" button.

Ispita_NavatarIspita_Navatar

Hi,

For this you need to do the following:-

 

1. Create a connector object between contact and account.

2. Create a custom visual force page which will give you the listing of contacts in the system and will allow you to select contacts and clicking of "add to Account" button on that page will create instances of the connector objects with the necessary information.

3. Then you need to create a custom button in Account "Add  Contact to Account" and call your custom page on the click of this button.

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.

 

honda57honda57

Thanks.  That helps, but I'm just a "glorified" admin at this point.  I think I could build the connector object and VF page, but I'm stuck on the code for the button.  How would I write that?