Madeofmokoi / ninox

1 stars 0 forks source link

Emails ideas #2

Open Madeofmokoi opened 3 years ago

Madeofmokoi commented 3 years ago

I find it very quick, below is an example of my solution: if 'Print Layout' = 4 then 'Print Layout Name' := "Large Quote" else if 'Print Layout' = 5 then 'Print Layout Name' := "Monthly" else if 'Print Layout' = 6 then 'Print Layout Name' := "Small" else if 'Print Layout' = 7 then 'Print Layout Name' := "India" end end end; if Subscription < (= 1) then let myEmail := userEmail(user()); let myPdf := printAndSaveRecord(this, 'Print Layout Name'); let myName := "QUOTE-" + 'Quotes No' + ".pdf"; importFile(this, myPdf, myName); let myHtml := replace(raw('Rich text'), "##Customer##", Customer.Name + "
" + Subscription); sendEmail({ from: myEmail, to: "MYNAME@MYDOMAIN.com", subject: "New Quote", text: text(myHtml), html: myHtml, attachments: files(this) }); 'Invoice Image' := myName end end