Print to File with Invoice Number
Hi,
Could anyone tell me how to export to file from print to PDF with a particular field information in it? Such as Invoice Number? Thank you.
2 replies
-
Hi
If your print layout is called Invoices, try this
importFile(this, printAndSaveRecord(this, "Invoices"), "Invoice " + invoiceNumber + ".pdf")
It will save a copy of your invoice to the attachments.
Regards John
-
In my case I have a small image cell on the main page that I prefer to input into that cell
ie say "delivery notes"
so an example of my script from my Print Delivery Note button is
NoteImage := null;
importFile(this, printAndSaveRecord(this, "118 Delivery Note"), "DN " + 'Job Ref' + ".pdf");
let myPdf := printAndSaveRecord(this, "118 Delivery Note");
let myName := "DN " + 'Job Ref' + ".pdf";
importFile(this, myPdf, myName);
waitForSync();
NoteImage := myNameThe first line clears the image (even if it is empty). That way if i save the image and then want to make and edit and resave. I can ensure I always have the latest image.
if you do it by the attachments page you can potentially end up with several many images
Content aside
- 1 yr agoLast active
- 2Replies
- 45Views
-
3
Following