12
Getting the subscriber procedure parameters correct is required to make eventing work but there is little to guarantee its correctly defined.
It would be great if the environment could warn us that the publisher and subscriber params don't match.
Moreover providing something in the code to show the sender object would also help. Example below.
Below I've included an example from the Manual setup publisher.
//**** current ****//
/// The subscriber should call the methods on the Sender object.
[IntegrationEvent(true, false)]
internal procedure OnRegisterManualSetup();
begin
end;
//**** current ****//
//**** proposed ****//
/// The subscriber should call the methods on the Sender object.
///
[IntegrationEvent(true, false)]
internal procedure OnRegisterManualSetup(var Sender Codeunit:"Manual Setup");
begin
end;
//**** proposed ****//
It would be great if the environment could warn us that the publisher and subscriber params don't match.
Moreover providing something in the code to show the sender object would also help. Example below.
Below I've included an example from the Manual setup publisher.
//**** current ****//
/// The subscriber should call the methods on the Sender object.
[IntegrationEvent(true, false)]
internal procedure OnRegisterManualSetup();
begin
end;
//**** current ****//
//**** proposed ****//
/// The subscriber should call the methods on the Sender object.
///
[IntegrationEvent(true, false)]
internal procedure OnRegisterManualSetup(var Sender Codeunit:"Manual Setup");
begin
end;
//**** proposed ****//
STATUS DETAILS
Needs Votes
Comments
Hi Owen,
I think it's a good idea. I had the same problem when trying to implement the new manual setup.
Just want to let you know, that you can use intellisense (Ctrl+ Space). It will suggest all possible parameters, but without an order.
Kind regards,
Andreas
Category: Development
Business Central Team (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