1 Reply Latest reply on Apr 15, 2010 3:16 PM by philmodjunk

    Copy Portal Rows

    mgxdigital

      Title

      Copy Portal Rows

      Post

      Hi have a Quotes table and an Invoice table related by ID_Quote_pk & ID_quote_fk

       

      I have a portal on the Quotes layout and pull in items from Invoice Items table by the same relationship as the Quote - Invoice.

       

                                    Invoices              invoice_INVOICEITEM

      Quotes

                                    quote_INVOICEITEM

       

       

      I'm wanting to somehow make a script that when a quote is accepted, we can push the quote to an invoice.

      I know that i must now be thinking this through, so i'm hoping someone can help.

       

      I want a portal on my quotes layout so add items  to, then if the customer accepts it, I want to push a button and add the portal lines to my invoice layout. I would like to be able to delete portal rows on the invoice layout just incase we do not wish to invoice for that line.

       

      I have an invoiceitem portal on both layouts, but i can not get them to connect.

       

      Any help would be greatly appreciated.

       

      Thanks so much!

       

       

        • 1. Re: Copy Portal Rows
          philmodjunk

          It is possible to copy your line items from one table to another through a number of different methods.

           

          You'd isolate the Quote line items in a foudn set by performing a find or using Go To Related record, then loop through them creating records in the other table while passing the info in variables, global fields or a script parameter.

           

          However, it might be that you could avoid the issue completely. With many business, the line items for a quote and an invoice can be identical or nearly so in format if not in content. THus your  quotes and invoices might be linked to a single line items table.

           

          With some business, you might even treat quotes and invoices as the same record.


          When a quote is requested, you start a record where a field in the record is labeled "quote", when the order is placed, you change the field to "Invoice" and update the appropriate fields to make your quote into an invoice. You'll have to examine your business model and see if any of those options make sense for you or not.