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

Announcements

News and Announcements icon
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
    Microsoft Employee 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,314 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,781 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 1,356

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans