Reading event in .NET from event in BC

MikhailC
Member Posts: 1
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.
Mikhail
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.
Mikhail
0
Answers
-
[Topic moved from 'NAV Tips & Tricks' forum to 'NAV Three Tier' forum]
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions