EPSendDocument sendDocument;
InventTransferJour inventtransferjour ;
Filename filename;
;
select firstonly inventtransferjour where inventtransferjour.TransferId == 'AB001853' && inventtransferjour.UpdateType == InventTransferUpdateType::Receive;
filename = WinAPI::getTempPath() +'MyInvoice.pdf';
sendDocument = new EPSendDocument(inventtransferjour);
sendDocument.parmOriginal(true);
sendDocument.parmFileName(filename);
// Make document will run the report and send it to a PDF file with
// the path specified in filename
sendDocument.makeDocument();
To Cancel Deliver Remainder through X++ you can use below code sample. Thanks. static void _CancelDeliverRemainder_Sales(Args _args) { SalesLine SalesLine = SalesLine::find('SO0013', true); ; if (SalesLine) { // Set remaining inventory Qty to zero SalesLine.RemainInventPhysical = 0; // Set remaining physical Qty to zero SalesLine.RemainSalesPhysical = 0; // We have to cancel the SalesLine SalesLine.PurchStatus = PurchStatus::Canceled; SalesLine.update(); ...