Hi Everyone,
I try to send an email with an attached document, this code works very well, but I need to write a specific text for each email, for now the body arrives empty, does anyone know how to modify it?
thank you so much
//My code
var
SalesInvoiceHeader: record "Sales Invoice Header";
DocumentSendingProfile: Record "Document Sending Profile";
DummyReportSelections: Record "Report Selections";
Text2: text;
SalesInvoiceHeader.RESET();
SalesInvoiceHeader.SetRange("No.", "No.");
if SalesInvoiceHeader.FindSet() THEN begin
DocumentSendingProfile.TrySendToEMail(
DummyReportSelections.Usage::"S.Invoice".AsInteger(), SalesInvoiceHeader, 100, Text2,
4, false);
exit;
end;