4 Replies Latest reply on Feb 7, 2014 1:55 PM by philmodjunk

    email a layout

    PaulJones_1

      Title

      email a layout

      Post

           Hello I'm using the estimates layout and it has a script for email the estimate.

           I have copied this and made a purchase order layout that fills in the purchase order on another layout.

           I wanted then to send this ONE purchase order but for some reason it send them all.

           Below is my script and to be honest I'm really new to the dark arts of scripts hence trying to copy and paste:-)

           can you tell me whats wrong please.

           many thanks for your help in advance .

           paul

           PS

           I have tried the same script on a new layout for GAS Certs inserting gas certs and Gas IDPK in relevant areas and it works to a degree it lists the correct email name and address but will only copy the first PDF not the relevant one to this customer.

           The IDPK which I'm also using as the certificate number is inserted in the email header but the wrong pdf is showing in the mail.

           Both seem related as they are related on the same script . 

            

           Thanks

            

            

               

      Screen_Shot_2014-02-07_at_08.02.21.png

        • 1. Re: email a layout
          philmodjunk

               What layout do you start on with this script?

               Where is the button located on that layout? In a portal row?

               On the :"printable purchase order" layout do you see one record for every PO or one record for every PO line item?

          • 2. Re: email a layout
            PaulJones_1

                 I start on the purchase order input layout.

                 The button is located in the header 

                 I see all the purchase orders the layout  no matter what view.

                 the layout Purchase order has in it a portal row from another layout  (purchase order data) that is linked to the products tables for categories and product description etc please see enclosed

                 Ill put a view of the print up also.

                 Thanks

            • 3. Re: email a layout
              PaulJones_1

                   Print layout

              • 4. Re: email a layout
                philmodjunk

                     I think Go to Related record is just replicating your found set on the "Print" layout.

                     If both layouts (input and print) are based on the same table occurrence (have same name selected in Layout Setup| Show Records from), then you don't need to do any Go to Related records. You can just change layouts. When using Save as PDF, be sure to specify the "Current Record" option so that you only get a PDF of the one PO.

                     But you might also examine the way the starter solutions print a PO or Invoice. They pull up the correct group of LineITem records on a list view layout and this can be a much more flexible way to do this. (And then GTRR makes sense to bring up a found set of line items.)