0

Multiple print and save/email functions in one form

Seems I originally posted this in the German(?) forum original by mistake. Not sure if it makes much of a difference, but posting here just in case. Original post with error screenshot: https://ninoxdb.de/en/forum/technische-hilfe-5ab8fe445fe2b42b7dd39ee8/multiple-print-and-saveemail-functions-in-one-form-5d007dfcc2f80c3f32fb1ce8

 

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.

Reply

null

Content aside

  • 5 yrs agoLast active
  • 1499Views