web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

EventSubscriber to standard table events are suddenly no longer executed

(0) ShareShare
ReportReport
Posted on by 144

Hi,

wie have problems with EventSubsribers.

For example:
[EventSubscriber(ObjectType::Table, Database::"Item Reference", 'OnBeforeModifyEvent', '', true, false)]
local procedure OnItemReferenceOnBeforeModifyEvent(var Rec: Record "Item Reference")
begin
  Rec.Validate(MyDateField, Today);
end;

We are still in the test phase and we believe that it worked until recently. I'm not sure if it might have something to do with the update from 21.3 OnPrem to 21.6 OnPrem?
It seems that all standard table EventSubscribers are now ignored without errors. The problem seems to affect all table subscribers.

Does anyone have any ideas as to what could be causing this, or is there perhaps even something related to this?

regards
Ralf

I have the same question (0)
  • Suggested answer
    Nitin Verma Profile Picture
    21,698 Moderator on at
    RE: EventSubscriber to standard table events are suddenly no longer executed

    Hi,

    Can you try this Event?

    [EventSubscriber(ObjectType::Table, Database::"Item Reference", 'OnBeforeModifyEvent', '', true, false)]

  • neckit Profile Picture
    144 on at
    RE: EventSubscriber to standard table events are suddenly no longer executed

    Sorry - that was a typo in the post and I'll correct it right away. Of course, it's correct...event and not...trigger.

    Unfortunately, this does not solve the problem and it also affects many event subscribers, all of which worked before.

  • Suggested answer
    Nitin Verma Profile Picture
    21,698 Moderator on at
    RE: EventSubscriber to standard table events are suddenly no longer executed

    Did you try to debug the problem?

  • neckit Profile Picture
    144 on at
    RE: EventSubscriber to standard table events are suddenly no longer executed

    I simply added a message box to various EventSubcribers, e.g.: Message('Test1');
    If changes are made, they are accepted without the message being displayed.

  • Nitin Verma Profile Picture
    21,698 Moderator on at
    RE: EventSubscriber to standard table events are suddenly no longer executed

    so your message is displaying?

  • neckit Profile Picture
    144 on at
    RE: EventSubscriber to standard table events are suddenly no longer executed

    No! As described above: without the message being displayed.

    So the message is not displayed and the code is not run through!

  • Suggested answer
    YUN ZHU Profile Picture
    95,307 Super User 2025 Season 2 on at
    RE: EventSubscriber to standard table events are suddenly no longer executed

    Hi, I'm sorry that I don't have the environment of BC21.6 at present, but I tested it in BC22.1 and it seems that there is no problem.

    pastedimage1684197903009v1.png

    pastedimage1684197923687v2.png

    If this is a standard environment and there are no license issues. I suggest you submit an SR to Microsoft and ask them to assist with the investigation.

    Hope this helps.

    Thanks.

    ZHU

  • neckit Profile Picture
    144 on at
    RE: EventSubscriber to standard table events are suddenly no longer executed

    We found the problem :-)
    It was a license problem! The object numbers used were not included in the BC-OnPrem license. Due to the first parameter of the EventSubsriber, this was ignored without an error messages.

    Until recently we were still programming and testing in the test license and everything was OK there.
    Then the customer licenses were imported and the key users only now noticed that.

    regards
    Ralf

  • Suggested answer
    Nitin Verma Profile Picture
    21,698 Moderator on at
    RE: EventSubscriber to standard table events are suddenly no longer executed

    Thanks for the update.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,377

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,696 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,512 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans