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

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Reading event in .NET from event in BC

(0) ShareShare
ReportReport
Posted on by 30

Hello,

To give some context regarding my issue. I currently have a codeunit set up with an event subscriber which looks out for the OnAfterInsertEvent event for a specific table. This is because I want to extract the newly added data I added to my specified table. 

I also set up a web service on C# from the codeunit mentioned so as to process the data I extract from the table. I have no issues with using the methods in the code unit in the web service object in C#, however, I would like to be able to automatically process when a new entry to the table onto C# and this is where I would appreciate some assistance. 

I was thinking of triggering some new event when the OnAfterInsertEvent subscriber reads an OnAfterInsertEvent. This would look something like this within the codeunit:

[EventSubscriber] CheckNewContact(VAR Rec : Record Contact;RunTrigger : Boolean)
BEGIN
     MESSAGE('New Record has been added with ID %1\ID', Contact."No.");

     TRIGGER NetNewContactEvent; //This part is pseudo code

END;

Then the event trigger would be picked up in the .NET side and a handler would be created to know when a new contact is created.

Would this be possible? I would also be open for more suggestions if there are any more ideas on how to go about this.

Thank you for your time.

I have the same question (0)
  • Verified answer
    Andy Sather Profile Picture
    on at

    Hello  - We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist.  If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    I will open this up to the community in case they have something to add.

  • MikhailC Profile Picture
    30 on at

    Hello

    Thank you for your help it is greatly appreciated. I sent a request to join the community.

    Mikhail

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 1,775

#2
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 745 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 538 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans