The button should print as described 2 invoice and one packing slip from the invoice details page. The option of changing print copy amount would be good but not so important as I can always use the normal print method to do this if need be. I would like the button to do the printing with no more interaction from the user. just push the button and it prints the copies
invoiceID = invoice.get("invoice_id");
invoicedate = invoice.get("date").toDate();
organizationID = organization.get("organization_id");
invoiceIdList = List();
invoiceIdList.add(invoiceID);
json = Map();
response = invokeurl
[
url :"https://books.zoho.com/api/v3/invoices/pdf?invoice_ids=" + invoiceIdList + "&organization_id=" + organizationID
type :GET
connection:"books"
];
info response;
just pdf file export not print them
Here is my way to download an invoice using a customized button in All report:
1.First Create a Field in the main Form, For example name it Download_Invoice.2.Now you have to pass the invoice URL id to this field whenever an invoice is created for this record. check below.3.To Pass the the invoice url id, please use the code below.Inv_URL_ID = invoiceurl.remove("write here the url till it's showing CInvoiceID=");
form2.Download_Invoice=Inv_URL_ID;
4.Copy the below as per your fields name and vars.Inv_Link = Download_Invoice.remove(" ");
This way, you will have a customized button in the Form's reports that allow you to Download the invoice that you have created with one click.
Hope it was useful.