1

In codeunit 149005 "BCPT Line" , there is the function:


 internal procedure AddLogEntry(var BCPTLine: Record "BCPT Line"; Operation: Text; ExecutionSuccess: Boolean; Message: Text; NumSQLStatements: Integer; StartTime: DateTime; EndTime: Datetime)



I would like that we put a handled integration event in the beginning of this function.



OnBeforeAddLogEntry(BCPTLine, Operation, ExecutionSuccess, Message, handled);

    if Handled then

      exit;



Code:


  [IntegrationEvent(false, false)]

  local procedure OnBeforeSendSuccessEmail(ActionEventSubscriber: Record "NBAAEM Action Event Subscriber"; var Handled: Boolean)

  begin

  end;



Reason:


Many of us run BCPT flow with random data to get a better representation of the data that is used.


The problem with doing that is sometimes some items/customers/vendors have very special setting that makes a confirmation or message popup. In order to tackle that we do message/confirmation handlers.


But since this does not always occur we get an error for every time we didn't use the handler. An event like this can give us the possibility to skip that error if we want it.




I have seen some argument that is up to the developer to create clean test cases where the handlers are always used. To some extent that is valid. But the other side of the coin is that we have to do a lot of code cloning to make those test distinct. But the worst part is that will pollute the the actual performance test. Because now we have to filter out the records which has these particular settings. Settings that wasn't meant to be filtered upon. This will lead to that the slowest functions are those that prepares the data in the test and that makes the performance test quite useless since we can't measure the realistic flows.

Category: Development
STATUS DETAILS
Needs Votes
Ideas Administrator

Thank you for this suggestion! Currently this is not on our roadmap. We are tracking this idea and if it gathers more votes and comments we will consider it in the future. Best regards, Business Central Team