+ Start a Discussion
Blair Burnette 2Blair Burnette 2 

How to create multiple custom object records on one page?

Hello all,

I am new to the development side of Salesforce administration. I would like help either making a Flow or creating a Visualforce page.

Here is the scenario: I am working with a non-profit organization that receives furniture donations and then provides furniture to individuals in need. Basically, we need to a way to track donations and pick-ups, and keep inventory current. Products/Orders objects don't work because these are donations, so price books and all of that is irrelevant.

I created a couple of custom objects: Furniture Donations (parent record is Opportunity) and Furniture Scheduling. Furniture Donations is where inventory will be tracked, with each record a piece of donated furniture. Furniture Scheduling will track incoming and outgoing donations.

Because donors often donate several pieces of furniture at a time, I'd like staff to create one Opportunity record, and then add Furniture Donation records (a related list on Opportunity) for each donated piece.

To make data entry more efficient, I'd like staff to be able to add multiple records on one page, rather than have to keep clicking "Save & New." 

Similarly, for outgoing furniture, clients might take multiple pieces of furniture. Thus, I'd like to create one Furniture Scheduling record  (record type 'Outgoing Furniture'), and link it to all applicable Furniture Donation records. Is there a way to do this on one screen? So, Furniture Scheduling would look up to Furniture Donations, and we'd like to be able to add each piece of furniture the clients took on one screen, rather than have multiple look-up fields or clicking save & new.

Any ideas on how to accomplish this, either through Flow or through a Visualforce page? Any help at all is appreciated. Thank you!

Neha AggrawalNeha Aggrawal
Hi Blair,

I had faced something similar where I had an object called Recurring Donation which was a parent of Opportunity. We used to receive multiple Post Dated cheques and it was painsome to add 12-24 cheques by saving one Opportunity each.

What I did was, to take the number of cheques in Recurring Donation as input, let say 12, as soon as user saves the Recurring Donation record, 12 empty opportunities would be created automatically. This I did using Apex trigger. You can than use the Mass Update Tool from AppExchange: https://appexchange.salesforce.com/appxListingDetail?listingId=a0N30000003J6KcEAK

You can add your own fields here, now your users will be able to update the details alltogether on a single page.
Does that make sense to you.

Hope this helps.
Thanks and Regards, 
Neha Aggrawal
www.initaura.com - Everything Salesforce (https://www.initaura.com)