microsoft / microsoft/BCApps

[Bug]: HideDialog is not transferred to codeunit 452 "Report Distribution Management"

Open Beginner friendly
#9,009 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

AI-Triage Approved Team: Integrations
Dominant language
AL
Stars
683
Forks
459
Avg merge
3d 26m
Merged PRs (30d)
633

Description

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
  • I will provide a fix for a bug

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/Layers/W1/BaseApp/Foundation/Reporting/DocumentSendingProfile.Table.al and follow the Electronic Document branch into ReportDistributionManagement.Codeunit.al. Inspect how ShowDialog and SendXmlEmailAttachment are handled, then reproduce the documented Document Sending Profile scenario. Done means sending the sales invoice without dialog no longer shows the e-mail message dialog.

Written by the indexing model from the issue text.

Assessment

Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.