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
tmbarrytmbarry 

Create Multiple Entries from a Single Entry

I am trying to create multiple entries from single entry, let me explain.

On the opportunities tab, we have four custom text boxes, one for each product the customer is requesting a price for.   I have created a custom object called "pricing" that allows our users run the pricing model for each product.  What I would like to b able to do is either, 1- on pressing the save button on the opportunities, automatically create four “pricing” entries, one for each product on the opportunity in the “Pricing” object or 2-create a customer button on the opportunity object that would do the afore mentioned.

Any ideas on where to start?

Thx

tmbarry

RickyGRickyG
tmbarry -

It sounds like you are creating a product which is, in effect, a child of the opportunity record.  Why not create a separate object and use a relationship field to connect them?  The interface would be a bit different, with a related list for the products, but it would do exactly what you want, and handle any number of products for an opportunity appropriately.

Unless I have missed something about what you are trying to do - in which case, please let me know.

Hope this helps.


tmbarrytmbarry

Thanks for the response Rick. 

While you are correct, in theory "Pricing" is a child of the opportunity, in reality or as close to reality as I can get, it is a child of the account.  The goal is to be able to see all the products sold under the accounts tab. 

 

 

RickyGRickyG
I'm not sure how immediate your need is, but you might want to take a look at Visualforce.  You can create pages with data from multiple objects, even without the need for custom controllers.  Visualforce is slated to be available to DE accounts in the Winter '08 time frame.

Your other option would be to use Apex triggers, if they are available in your edition.


Message Edited by RickyG on 10-09-2007 12:59 PM

TheDevLifeTheDevLife

tmbarry,

 

You can do what you want to do. For option #1 (on Save), you would need to use Apex code to create the the price entries.  For option #2, you can use something called an S-Control. An S-Control allows custom code to be written in HTML and Javascript that could do this sort of thing. Then you can link the S-Control to a custom button on the opportunity. This is probably the easiest way to go. You might want to take a look at the Force.com Cookbook to give you some ideas on S-Controls. It can be found here: http://www.apexdevnet.com/events/cookbook/registration.php.

 

Randy

tmbarrytmbarry
Randy,
 
Thanks for the info.  I have just begun looking at S-Controls.  I while am a VB & VBA programmer, this S-corntol stuff seems a little overwhelming right now, but I am sure I will be able to get through it. 
 
Do you know, when I create a button to create the four entries, can the entries be created without the user pressing the button actually viewing the entries.  That is, I press the button "create pricing entries" and then enter another opportunity without having to view the pricing entries I just created.
 
tmbarry.
TheDevLifeTheDevLife
tmbarry,
 
in an S-control you can pretty much do anythiung you want. So for example, you can have the S_control ask you which opportunity you want to create the price entries for and then you can keep it looping asking for the next one, etc.
 
Randy