Closed ghost closed 5 years ago
See here:
The parameter list is determined by the publisher function. With business events, you cannot deviate from the parameters that are defined in the publisher function. Integration events are not as restricted and you can deviate from the parameters that are defined in the publisher function.
You can skip parameters, but cannot add not existing ones. Where, in your sample, the subscriber's variable i should take value from and how it is connected to the publisher if it does not declare such a parameter?
You can add more parameters if globalvaraccess is on. Their names must match the global variables declared in the object-publisher. See the article about globalvaraccess-property.
Hi,
I am trying to migrate C/AL developments to AL and I realized that now it's not possible to include my own parameters in event subscriber declaration as it was done in C/AL. I know that if I use my own integration event I could do almost everything but I need to use a stantard event. Below there is a code sample:
[EventSubscriber(ObjectType::Page, Page::"Sales Order", 'OnQueryClosePageEvent', '', false, false)] local procedure MyProcedure(var Rec: Record "Sales Header"; var i: Integer) begin //customcode end;
The error thrown is the next:
The member referenced by event subscriber 'MyProcedure' parameter 'i' is not found
Does it means that I can't subscribe to an event including my own parameters?
Thank you in advance