13. Mai 2019 13:46
LOCAL [EventSubscriber] TableSalesHeader_OnBeforeDeleteEvent(VAR Rec : Record "Sales Header";RunTrigger : Boolean)
IF Rec.ISTEMPORARY THEN
EXIT;
productionOrderL.RESET;
productionOrderL.SETRANGE("Sales Order No.",Rec."No.");
productionOrderL.SETFILTER(Status,'%1..%2',productionOrderL.Status::Planned,productionOrderL.Status::Released);
IF NOT productionOrderL.ISEMPTY THEN
IF CONFIRM(ExistingFAConfrm,FALSE) THEN BEGIN
productionOrderL.DELETEALL(TRUE);
END ELSE
ERROR(CanceledErr);
13. Mai 2019 14:16
13. Mai 2019 14:24
13. Mai 2019 14:27
13. Mai 2019 14:57
13. Mai 2019 16:56
LOCAL [EventSubscriber] TableSalesHeader_OnBeforeDeleteEvent(VAR Rec : Record "Sales Header";RunTrigger : Boolean)
IF Rec.ISTEMPORARY OR NOT RunTrigger THEN
EXIT;
productionOrderL.RESET;
productionOrderL.SETRANGE("Sales Order No.",Rec."No.");
productionOrderL.SETFILTER(Status,'%1..%2',productionOrderL.Status::Planned,productionOrderL.Status::Released); //MC.N 13.05.19 RSC
IF NOT productionOrderL.ISEMPTY THEN
IF CONFIRM(ExistingFAConfrm,FALSE) THEN BEGIN
productionOrderL.DELETEALL(TRUE);
END ELSE
ERROR(CanceledErr);