4
Page event subscribers should have access to the page which has triggered the event.
Imagine I want a custom field (NOT based on a table field) to trigger an update of data in a Factbox.
[EventSubscriber(ObjectType::Page, Page::"Customer Card", 'OnAfterValidateEvent', 'SomePageField', true, true)]
local procedure SomePage_OnAfterValidatePageField(CurrPage:Page "Customer Card")
begin
CurrPage."Custom Factbox".Page.CallFunction(SomePageField);
end;
This doesn't work for two reasons.
- You can't access the page from the subscriber codeunit
- You can't access the value of SomePageField from the subscriber codeunit
Both should be available.
Without this ability, the only way to achieve this is to put the event subscriber into the page extension, and this breaks one of the codecops.
STATUS DETAILS
New