Mypdf.pdf template ?
Hello,
I don't understand where can I change template (design) of invoice : mypdf.pdf ?
For sending mail I have problem too, my script on button is :
let PEC := importFile(this, printAndSaveRecord(this, "Client.Nom"), "mypdf.pdf");
sendEmail({
from: text("mric@mywebsite.net"),
to: text(Client.Email),
subject: "Hello World!",
text: "Some text",
html: "<h1>Some Text</h1><i>With Markup</i>",
attachments: PEC
})
But I don't receveive my test mail ... (Pdf is ok in attached file)
Thanks,
Mric
10 replies
-
1) If you want to send email with ninox, you need a cloud subscription.
2) Email sender is always the user email you used to login the ninox cloud.
3) Sometimes attachment is not included because email is not yet generated when email is send.In my experience, a better approach is to make different buttons, one to make the pdf and one to send email.
Sample code I use (Dutch user):
Button1:
Image := null;
Image := importFile(this, printAndSaveRecord(this, "Mail"), "Factuur.pdf")Button2:
let sender := userEmail();
let BCCrec := userEmail();
let receiver := ClientEmail;
let subj := "Factuur";
let body :="Beste,....";
let att1 := Bijlage;
let att2 := Bijlage2;
sendEmail({
from: sender,
to: receiver,
bcc: BCCrec,
subject: subj,
text: body,
attachments: [att1, att2]
})The reason to send myself a BCC mail is just for controlling if the email was send.
In this example i send 2 attachments( from image fields). One generated in the button and one fixed pdf file inserted in the image field.
Steven
-
thanks, so i can't test without subscription :(
What about mypdf.pdf design generated ? Can I modify it ?
-
Yes, in the print editor you can change the layout or create new ones: in the example above the used layout is Mail, so the generated pdf is based on the 'Mail'-layout. See https://ninox.com/en/manual/print/print-formular for more info about printeditor.
Steven.
-
ooookkk ! :) Many thanks !
-
Sorry, I have a question, I'm in test (for 1 month) with ninox software, so I think I have cloud actived, no ?
-
Yes, you can try to send email i guess.
-
I tried different script but no result ..
The last one :
let PEC := importFile(this, printAndSaveRecord(this, "Client.Nom"), "mypdf.pdf");
sendEmail({
from: text(userEmail()),
to: text(Client.Email),
subject: "Hello World!",
text: "Some text",
html: "<h1>Some Text</h1><i>With Markup</i>",
attachments: PEC
})Maybe someone can help me ?
-
Sometimes attachment is not included because pdf is not yet generated/loaded when email is send.
In my experience, a better approach is to make different buttons, one to make the pdf and one to send email.
Can you try this first? So we know if there's nothing wrong with the script.
Is the name of your printlayout "Client.Nom" ? -
I only test
sendEmail({
from: text(userEmail()),
to: text(Client.Email),
subject: "Hello World!",
text: "Some text",
html: "<h1>Some Text</h1><i>With Markup</i>"
})I don't receive mail ....
-
Sorry, mail is OK (but go in my SPAM ...)
Now I will test with attachment ...
Content aside
- 4 yrs agoLast active
- 10Replies
- 1130Views