ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

Event Movement Request CU 9520 OnBeforeSendMailOnWinClient

Open mfalk118 opened this issue 7 years ago • 2 comments

Please move the event from the current location up before the serverfile is deleted. This enables us to log the sent atachment in an email log:

local procedure SendMailOnWinClient(): Boolean var Mail: Codeunit Mail; FileManagement: Codeunit "File Management"; ClientAttachmentFilePath: Text; ClientAttachmentFullName: Text; begin if Mail.TryInitializeOutlook then with TempEmailItem do begin //>>New Location OnBeforeSendMailOnWinClient(TempEmailItem); //<<New location if "Attachment File Path" <> '' then begin ClientAttachmentFilePath := DownloadPdfOnClient("Attachment File Path"); ClientAttachmentFullName := FileManagement.MoveAndRenameClientFile(ClientAttachmentFilePath, "Attachment Name", ''); end; //Current Location OnBeforeSendMailOnWinClient(TempEmailItem); if Mail.NewMessageAsync("Send to", "Send CC", "Send BCC", Subject, GetBodyText, ClientAttachmentFullName, not HideMailDialog) then begin FileManagement.DeleteClientFile(ClientAttachmentFullName); MailSent := true; exit(true) end; end; exit(false); end;

mfalk118 avatar Oct 04 '19 08:10 mfalk118

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.

bc-ghost avatar Oct 30 '19 17:10 bc-ghost

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.

bc-ghost avatar Nov 12 '19 10:11 bc-ghost