1 Reply Latest reply on Feb 19, 2013 2:46 PM by keywords

    Send By Email

    micheleclark

      I am trying to apply a Send By Email button to my form, which has a portal that has an ongoing list of Invoices.

       

      As my database extends over a bunch of different tables, I cannot figure out which field to point it towards or which script to write or how to setup the button for it to include all fields.

       

      This is my relationship table:

       

      Screen shot 2013-02-19 at 3.08.54 PM.png

       

      This is the form, based off the Sales table, then having the tabbed list of growing invoices in chocolate and in liquor.

      Screen shot 2013-02-19 at 3.11.53 PM.png

       

      Essentially each customer has a record, and its own list of new and old invoice. How would i send this my email or send an email only of the customer and the new order?

       

      THANKS SO MUCH!

        • 1. Re: Send By Email
          keywords

          How would i send this my email or  send an email only of the customer and the new order?

           

          Here are a few thoughts to get you started Michele:

           

          1.     Build a script to (a) gather the details of the invoice you wish to send, (b) create the invoice, and (c) send it as an attachment (most likely a pdf) to your email.

           

          2.     Gather details:  Use a series of Set variable () script steps to collect all the details you need for the invoice you wish to send. On the Sales table layout in your image you will presumable be gathering some data from the parent record (name, address, email address, etc) and some from the portal/s (the relevant line item details of the order). To collect this detail from multiple lines in the portal the script will need to loop through the portal.  NOTE 1: If you only wish to gather some of the line items, then you will need a checkbox field (or something else, eg an invoice field to distinguish between new and past orders) to identify the lines to be included in this invoice, so the script will only collect the data needed.  NOTE 2: If you have more than one tab and/or portal where details may be (chocolates, liquor) you will need to give the tabs and portals object names and use Go to Object () so that your script can navigate correctly.

           

          3.     Create the invoice:  Make a separate layout for your invoice and populate it with the variables created above. Your script needs to navigate to this layout, do whatever is needed to create the invoice, then save it as a pdf.

           

          4.     Send the email:  Construct your email in the relevant using the Send Mail script setting all the relevant options dynamically using the variables you have set above.

           

          Hope that's of some assistance.