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.

  • MikhailC Profile Picture
    30 on at
    RE: Reading event in .NET from event in BC

    Hello

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

    Mikhail

  • Verified answer
    Andy Sather Profile Picture
    on at
    RE: Reading event in .NET from event in BC

    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.

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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,655

#2
Mansi Soni Profile Picture

Mansi Soni 1,574

#3
YUN ZHU Profile Picture

YUN ZHU 1,453 Super User 2025 Season 1

Featured topics

Product updates

Dynamics 365 release plans