How can I add several entries at once in a related list?

Say, I have a custom object gifts where I want to save which (christmas) gifts a certain account likes.

Now I have created a junction table to resolve many-to-many relations. And I see this gift_for_account junction table as related list in both gifts and account.

When I want to add new gifts to one account, I have to click New gift_for_account one by one to add those items.

What would be the smoothest way to do this? Do I have to dig deep into Force.com or are there other ways to get this done? Does anyone have a link for a tutorial?

1 Answer 1


You would need to write a Custom Visualforce Page and then either override the New Button or remove the new Button from the related list and add your custom New Button, which directs the creation to your Custom VF page, where you've written logic to be able to create multiple relationship records.

Salesforce only supports creation of multiple junction objects in case of OpportunityContactRole or AccountContactRole, i.e. junction objects which come out of the box. If you've added Contact Roles, you'll set what I mean.

  • Thanks! Did I get it right, that I could solve that problem with VisualForce alone? And it works with all custom objects, right?
    – mcbetz
    Oct 29, 2012 at 16:39
  • Yes you will need custom visualforce. Unless you write it genetically enough to handle any junction object, you will have to write one for every junction object that you want to multiedit. So for now you can write one for this gift_for_account object. Oct 29, 2012 at 17:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .