Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

Event OnAfterDocumentPrintReady is not raised during printing in BC18

Posted on by Microsoft Employee

Hi Everyone
I'm trying to subscribe to the OnAfterDocumentPrintReady event to define what happens when a user chooses to print a report.
The problem is that this event, in BC18, seems not to be raised. Even using the "Event Recorder" I can't find it in the list.

Event Recorder BC18

EventRecorderBC18.PNG

I think that the problem is not related to my code, because in BC16 everything works fine. Do you know why it happens?

Event Recorder BC16

EventRecorderBC16.PNG

My goal is to get the InputStream of the pdf report when a user presses the "print" button on the request page,
do you know if there is any other similar event I can subscribe to?

Thank you.

  • Suggested answer
    RE: Event OnAfterDocumentPrintReady is not raised during printing in BC18

    Hello,

    This was changed in BC17 and is kind of documented here: The trigger only runs from an extension printer:

    Printing Reports - Business Central | Microsoft Docs

    pastedimage1660559009333v1.png

    So from BC17 the trigger is not used for browser prints or Windows server print jobs. It was a bug in early 16 versions that it could be called for other setups, which actually caused a high number of session crashes.

    Sorry if this is not helpful to you, but I hope it at least clarifies what you see and that you have other triggers / events that you can use.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,558 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,645 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans