AnsweredAssumed Answered

Duplicating a record with multiple portals

Question asked by AJ on Jan 22, 2009
Latest reply on Jan 27, 2009 by AJ


Duplicating a record with multiple portals


Say I have an order that I'm building for a customer in a table called ORDER. In the ORDER table, I have an auto-enter field "Order Number", fields from my CUSTOMER table (name, address, customer ID, etc), and 2 portals.


The ORDER table has a relationship to OrderLineItemProducts and with OrderLineItemServices, which are related to the PRODUCTS table and SERVICES table (respectively). The Products and the Services table each hold information for different products and services that we offer.


Say that once I build an order that has several records in each of those two portals (as well as the cust. info, etc.), I need to DUPLICATE THE ENTIRE ORDER, with a new order number.


I have a returning customer and the customer wants to place the same order again. I need to create a new reciept with a new order number with all of the same Products and Services that he ordered last time.  Duplicating the record only copies the Customer Information to a new order. How do I copy the related records from the portals on the old order into the portals on the new order, without having to input them all over?

I know that I have to run some sort of script, but I am at a loss of what commands to enter.