12

EventSubscribers should be allowed in Extension objects.

For example, if I want to extend the Check Report to have an Amount column formatted in a different way.


reportextension 99900 "Check" extends Check
{
    dataset
    {
        add(PrintCheck)
        {
            column(CustomFormatAmount; CustomFormatAmount) { }
        }
    }
    [EventSubscriber(ObjectType::Report, Report::Check, 'OnAfterFormatNoText', '', false, false)]
    local procedure Testing(No: Decimal)
    begin
        CustomFormatAmount := format(No, 0, 'Some format string');
    end;


    var
        CustomFormatAmount: Text;
}


This is not allowed because you can't call the event subscriber from the extension object.

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