diff --git a/Apps/W1/APIV1/app/src/pages/APIV1SalesOrders.Page.al b/Apps/W1/APIV1/app/src/pages/APIV1SalesOrders.Page.al index 254a581d1c..530017b224 100644 --- a/Apps/W1/APIV1/app/src/pages/APIV1SalesOrders.Page.al +++ b/Apps/W1/APIV1/app/src/pages/APIV1SalesOrders.Page.al @@ -451,10 +451,15 @@ page 20028 "APIV1 - Sales Orders" } trigger OnAfterGetRecord() + var + IsCompletelyShipped: Boolean; begin SetCalculatedFields(); - if HasWritePermission then + if HasWritePermission then begin + IsCompletelyShipped := Rec."Completely Shipped"; GraphMgtSalesOrderBuffer.RedistributeInvoiceDiscounts(Rec); + Rec."Completely Shipped" := IsCompletelyShipped; + end; end; trigger OnDeleteRecord(): Boolean diff --git a/Apps/W1/APIV2/app/src/pages/APIV2SalesOrders.Page.al b/Apps/W1/APIV2/app/src/pages/APIV2SalesOrders.Page.al index acf7eff5df..90ccdfe0e6 100644 --- a/Apps/W1/APIV2/app/src/pages/APIV2SalesOrders.Page.al +++ b/Apps/W1/APIV2/app/src/pages/APIV2SalesOrders.Page.al @@ -613,10 +613,15 @@ page 30028 "APIV2 - Sales Orders" } trigger OnAfterGetRecord() + var + IsCompletelyShipped: Boolean; begin SetCalculatedFields(); - if HasWritePermission then + if HasWritePermission then begin + IsCompletelyShipped := Rec."Completely Shipped"; GraphMgtSalesOrderBuffer.RedistributeInvoiceDiscounts(Rec); + Rec."Completely Shipped" := IsCompletelyShipped; + end; end; trigger OnDeleteRecord(): Boolean