From 259604c86c58ddd0db8df2087532340060a94e75 Mon Sep 17 00:00:00 2001 From: Marcus Nordlund Date: Mon, 5 Feb 2024 13:25:32 +0100 Subject: [PATCH] Refactored call to publisher event --- .../App/src/BCPTLine.Codeunit.al | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/Tools/Performance Toolkit/App/src/BCPTLine.Codeunit.al b/src/Tools/Performance Toolkit/App/src/BCPTLine.Codeunit.al index 27b3c0e134..df1ff94fb1 100644 --- a/src/Tools/Performance Toolkit/App/src/BCPTLine.Codeunit.al +++ b/src/Tools/Performance Toolkit/App/src/BCPTLine.Codeunit.al @@ -166,12 +166,8 @@ codeunit 149005 "BCPT Line" BCPTRoleWrapperImpl: Codeunit "BCPT Role Wrapper"; // single instance ValuesAreChanged: Boolean; BCPTTestSuite: Codeunit "BCPT Test Suite"; - ModifiedMessage, ModifiedOperation : Text; - ModifiedExecutionSuccess: Boolean; begin - InitValuesSubscriberCanModify(Operation, ExecutionSuccess, Message, ModifiedExecutionSuccess, ModifiedMessage, ModifiedOperation); - BCPTTestSuite.OnBeforeBCPTLineAddLogEntry(BCPTLine."BCPT Code", BCPTLine."Codeunit ID", BCPTLine.Description, Operation, ExecutionSuccess, Message, ModifiedOperation, ModifiedExecutionSuccess, ModifiedMessage); - UpdateValuesFromSubscribers(Operation, ExecutionSuccess, Message, ModifiedExecutionSuccess, ModifiedMessage, ModifiedOperation); + BCPTTestSuite.OnBeforeBCPTLineAddLogEntry(BCPTLine."BCPT Code", BCPTLine."Codeunit ID", BCPTLine.Description, Operation, ExecutionSuccess, Message, Operation, ExecutionSuccess, Message); BCPTLine.Testfield("BCPT Code"); BCPTRoleWrapperImpl.GetBCPTHeader(BCPTHeader); @@ -239,16 +235,6 @@ codeunit 149005 "BCPT Line" Dimensions) end; - local procedure UpdateValuesFromSubscribers(var Operation: Text; var ExecutionSuccess: Boolean; var Message: Text; var ModifiedExecutionSuccess: Boolean; var ModifiedMessage: Text; var ModifiedOperation: Text) - begin - if ModifiedExecutionSuccess <> ExecutionSuccess then - ExecutionSuccess := ModifiedExecutionSuccess; - if ModifiedMessage <> Message then - Message := ModifiedMessage; - if ModifiedOperation <> Operation then - Operation := ModifiedOperation; - end; - local procedure InitValuesSubscriberCanModify(var Operation: Text; var ExecutionSuccess: Boolean; var Message: Text; var ModifiedExecutionSuccess: Boolean; var ModifiedMessage: Text; var ModifiedOperation: Text) begin ModifiedMessage := Message;