Skip to content

Pass HideDialog to Report Distribution Management when sending electronic documents by e-mail - #10076

Open
Kilian Seizinger (pri-kise) wants to merge 2 commits into
microsoft:mainfrom
pri-kise:9009-fix-hidedialog
Open

Pass HideDialog to Report Distribution Management when sending electronic documents by e-mail#10076
Kilian Seizinger (pri-kise) wants to merge 2 commits into
microsoft:mainfrom
pri-kise:9009-fix-hidedialog

Conversation

@pri-kise

@pri-kise Kilian Seizinger (pri-kise) commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

What & why

When a Document Sending Profile has E-Mail Attachment = "Electronic Document" and E-Mail = "Yes (Use Default Settings)", the Email Editor dialog was still shown because Report Distribution Management's HideDialog state was never initialized. Call InitializeFrom(not ShowDialog) before SendXmlEmailAttachment in both the customer and vendor e-mail paths, and add regression tests to DocumentSendingPostTests.

Linked work

Fixes #9009

How I validated this

  • I read the full diff and it contains only changes I intended.
  • I built the affected app(s) locally with no new analyzer warnings.
  • I ran the change in Business Central and confirmed it behaves as expected.
  • I added or updated tests for the new behavior, or explained below why none are needed.

What I tested and the outcome (required — be specific: scenarios, commands, screenshots for UI changes)

Risk & compatibility

It's just a fix that ensure that no E-mail sending dialog opens, when the user already selected that default options should be used.

…onic documents by e-mail

When a Document Sending Profile has E-Mail Attachment = "Electronic Document" and
E-Mail = "Yes (Use Default Settings)", the Email Editor dialog was still shown because
Report Distribution Management's HideDialog state was never initialized. Call
InitializeFrom(not ShowDialog) before SendXmlEmailAttachment in both the customer and
vendor e-mail paths, and add regression tests to DocumentSendingPostTests.

Fixes microsoft#9009
@pri-kise
Kilian Seizinger (pri-kise) requested a review from a team August 10, 2026 08:16
@github-actions github-actions Bot added From Fork Pull request is coming from a fork Integration GitHub request for Integration area needs-approval Workflow runs require maintainer approval to start and removed needs-approval Workflow runs require maintainer approval to start labels Aug 10, 2026
Comment thread src/Layers/W1/Tests/Misc/DocumentSendingPostTests.Codeunit.al
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

From Fork Pull request is coming from a fork Integration GitHub request for Integration area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant