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
Katie KourtakisKatie Kourtakis 

Is it possible to create multiple records using visualforce page and list button?

I would like to use a list view button to create a record for all contacts selected. Is this possible with a visualforce page or declarative functions? 

For my case I have two custom objects: Dinner__c and Invitation__c. When my user is on the contact list view I would like them to be able to select all the contacts that they wish to invite to dinner and then press a button to create an Invitation record for all of them. The Invitation record is a junction object connecting the contact with a dinner. My user only needs to edit the dinner lookup field on the invitation object, all other fields would be defaults.

Thanks!