web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

How to create a bound action to print a document

(0) ShareShare
ReportReport
Posted on by 5

Hi

I followed Roberto Stefanetti's post on bound actions to create bound actions in Business Central, and I managed to create bound actions to release and reopen orders.

I tried to create a bound action to print a confirmation order but I can't make it work

I work on Business Central 15.5 On-premise

I created a Print procedure

[ServiceEnabled]
procedure Print(var actionContext: WebServiceActionContext)
var
    DocPrint: Codeunit "Document-Print";
    Usage: Option "Order Confirmation","Work Order","Pick Instruction";
begin
    DocPrint.PrintSalesOrder(Rec, Usage::"Order Confirmation");

    actionContext.SetObjectType(ObjectType::Page);
    actionContext.SetObjectId(Page::SalesOrderList);
    actionContext.AddEntityKey(Rec.FieldNo("Document Type"), Rec."Document Type");
    actionContext.AddEntityKey(Rec.FieldNo("No."), Rec."No.");

    actionContext.SetResultCode(WebServiceActionResultCode::Updated);
end;

I publish the page and test the web service
{baseurl}/ODataV4/Company('CRONUS France S.A.')/ListeCdeMultiSoc('Order','1001')/NAV.Print

The return status is OK, but there is no printing

On the Business Central server, in the Windows Event Viewer, there is this warning : Cannot download print stream to client for report ID 1305 unsupported client type WebServiceClient.

pastedimage1613141741262v1.png

Do you know how to create a bound action to print a document, if possible ?

Thank you

Claude

  • Suggested answer
    Marco Mels Profile Picture
    Microsoft Employee on at

    Hello,

    We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist.  If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    dynamicsuser.net/.../developers

    I will open this up to the community in case they have something to add.

    Thanks.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 796 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 481 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 377 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans