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.
Do you know how to create a bound action to print a document, if possible ?
Thank you
Claude

Report
All responses (
Answers (