Describe the issue
If a Document Sending Profile is configured for E-Mail attachment Electronic Document and the sending is executed without dialog then the e-mail dialog is still shown.
Expected behavior
No E-mail message dialog should be shown.
Steps to reproduce
Configure an Electronic Document Format.
Configure a Document Sending Profile with "E-Mail Attachment":: "Electronic Document" and "E-Mail"::"Yes (Use Default Settings)".
Set this document sending profiel for a customer
Then try to send e.g. a Sales Invoice with this format.
Now the e-mail dialog is shown although it shouldn't be shown.
Additional context
Suggest change:
"E-Mail Attachment"::"Electronic Document":
begin
ReportSelections.GetEmailBodyForCust(EmailBodyTempBlob, ReportUsage, RecordVariant, ToCust, SendToEmailAddress);
ReportDistributionManagement.InitializeFrom(not ShowDialog) // Line to be added
ReportDistributionManagement.SendXmlEmailAttachment(
RecordVariant, "E-Mail Format", EmailBodyTempBlob, SendToEmailAddress, ReportUsage);
end;
https://github.com/microsoft/BCApps/blob/main/src/Layers/W1/BaseApp/Foundation/Reporting/DocumentSendingProfile.Table.al
https://github.com/microsoft/BCApps/blob/main/src/Layers/W1/BaseApp/Foundation/Reporting/ReportDistributionManagement.Codeunit.al
I will provide a fix for a bug
Describe the issue
If a Document Sending Profile is configured for E-Mail attachment Electronic Document and the sending is executed without dialog then the e-mail dialog is still shown.
Expected behavior
No E-mail message dialog should be shown.
Steps to reproduce
Configure an Electronic Document Format.
Configure a Document Sending Profile with "E-Mail Attachment":: "Electronic Document" and "E-Mail"::"Yes (Use Default Settings)".
Set this document sending profiel for a customer
Then try to send e.g. a Sales Invoice with this format.
Now the e-mail dialog is shown although it shouldn't be shown.
Additional context
Suggest change:
"E-Mail Attachment"::"Electronic Document": begin ReportSelections.GetEmailBodyForCust(EmailBodyTempBlob, ReportUsage, RecordVariant, ToCust, SendToEmailAddress); ReportDistributionManagement.InitializeFrom(not ShowDialog) // Line to be added ReportDistributionManagement.SendXmlEmailAttachment( RecordVariant, "E-Mail Format", EmailBodyTempBlob, SendToEmailAddress, ReportUsage); end;https://github.com/microsoft/BCApps/blob/main/src/Layers/W1/BaseApp/Foundation/Reporting/DocumentSendingProfile.Table.al
https://github.com/microsoft/BCApps/blob/main/src/Layers/W1/BaseApp/Foundation/Reporting/ReportDistributionManagement.Codeunit.al
I will provide a fix for a bug