codeunit 5000 "MYPostInvoiceSingleSalesOrder" { TableNo = "Sales Header"; trigger OnRun() var begin PostSingleSalesOrder(Rec); end; procedure PostSingleSalesOrder(var SalesHeader: Record "Sales Header"): Boolean var SalesBatchPostMgt: Codeunit "Sales Batch Post Mgt."; PostingDate: Date; begin PostingDate := TODAY(); SalesBatchPostMgt.RunBatch(SalesHeader, true, PostingDate, true, true, false, true);//incoice only end; }
Answers
2. Nullify quantity to ship missing - standard functionality fills this with outstanding quantity.