as in normal operation, I would like to automatically generate the PDF in the email that is sent.
When I use the code below, no attachment is generated. I would like have the PDF.
TemplateNotificationGenerator sender = TemplateNotificationGenerator.Create(une_attestation, notification.NotificationID.Value);
sender.MailAccountId = (notification.NFrom.HasValue) ? notification.NFrom.Value : PX.Data.EP.MailAccountManager.DefaultMailAccountID;
sender.RefNoteID = un_client.NoteID;
sender.LinkToEntity = true;
sender.BAccountID = une_attestation.Atclt;
sender.RefNoteID = une_attestation.NoteID;
if ((currentFilter.Usremail!=null) && (currentFilter.Usremail!=""))
{
sender.To = currentFilter.Usremail; //un_contact.EMail
}
Is it possible to do this without generating the document automatically?


I add this code to add the report in the email.