Multiple print and save/email functions in one form
I have 3 buttons. First is
Send Invoice
let myEmail := userEmail();
let myPdf := printAndSaveRecord(this, "Invoice");
let myName := "Cardia Bioproducts Invoice" + ".pdf";
importFile(this, myPdf, myName);
sendEmail({
from: myEmail,
to: Customer.'Account Email',
subject: "Cardia Bioproducts Invoice",
text: "Please find attached the invoice for your order",
attachments: file(this, myName)
})
Second is 'Print List'
importFile(this, printAndSaveRecord(this, "Packing"), "picklist.pdf")
Third is 'Second Job' (whose function is to send an email to our warehouse with all the attachments which includes the pick list and shipipng labels I would have previously attached)
let myEmail := userEmail();
sendEmail({
from: myEmail,
to: "email@email.com",
subject: "Subject here",
text: "Please see attached packing list and shipping labels for" + " " + Customer + ", " + "Order Ref:" + " " + 'Order Ref',
attachments: files(this)
})
The pick list and send job buttons aren't working, but the invoice one is. I've even tried changing the send job button to just print and send the packing list
let myEmail := userEmail();
let myPdf := printAndSaveRecord(this, "Packing");
let myName := "Packing List" + ".pdf";
importFile(this, myPdf, myName);
sendEmail({
from: myEmail,
to: Customer.'Account Email',
subject: "Cardia Bioproducts Shipment",
text: "Job details attached",
attachments: file(this, myName)
})
Pick list acts as if its processing when I click it, but send job brings up an error. I've also tried removing the formula from send invoice to see if that was interferring and I get the same issue.
2 Antworten
-
Do you use the ninox icloud version?
-
No, just the Ninox Cloud
Content aside
- vor 5 JahrenZuletzt aktiv
- 2Antworten
- 1603Ansichten