Subscriber for Published Integration event - NAV 2016
rnjbng
Member Posts: 82
Hi Folks -
In NAV 2016 codeunit 22 Item Jnl-Post line there is a function OnAfterInsertItemLedgEntry(ItemLedgEntry,ItemJnlLine); This function is a publisher with event type Integration. Does anyone know where I can find the subscriber for this published event(in other words code for this event). I checked the Event subscription and could not find Codeunit 22. Microsoft has not done a good job about the repository for Publisher and Subscription.
Any help is highly appreciated.
Thanks
SB.
In NAV 2016 codeunit 22 Item Jnl-Post line there is a function OnAfterInsertItemLedgEntry(ItemLedgEntry,ItemJnlLine); This function is a publisher with event type Integration. Does anyone know where I can find the subscriber for this published event(in other words code for this event). I checked the Event subscription and could not find Codeunit 22. Microsoft has not done a good job about the repository for Publisher and Subscription.
Any help is highly appreciated.
Thanks
SB.
0
Comments
-
If you don't see a publisher in Event Subscriptions then nothing is subscribed to it.
Sometimes it happens that if you change subscriber signature it is no longer subscribed to a publisher.
Why MS did a wrong job on this one? Would you prefer to see a table all publishers, even unsubscribed to ones? That would be tens thoushands of entries; every table, every fields, every OnBefore/After Insert/Delete/Modify/Validate + publishers in the code?
Slawek Guzek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-030 -
Thanks Slawek, was very helpful.0
-
A function with which you can find all subcribers to a particular publisher when you move about in the code lines is something that really is overdue. The new Object Manager Advanced Version 12 now includes publishers and subcribers in their "Where used" function, but MS should do their homework here as well.Kai Kowalewski0
-
@kowa you can already see subscriptions in the code in Event Subscription virtual table.
LOCAL PROCEDURE ShowEventSubscribers@1(PublObjType: ',Table,,Report,,Codeunit,XMLPort,,Page,Query';PublObjID: Integer); Object : Record 2000000001; EventSubscr : Record 2000000140; Subscribers : Text; WITH EventSubscr DO BEGIN CASE PublObjType OF PublObjType::Table: SETRANGE("Publisher Object Type", "Publisher Object Type"::Table); PublObjType::Report: SETRANGE("Publisher Object Type", "Publisher Object Type"::Report); PublObjType ::Codeunit: SETRANGE("Publisher Object Type", "Publisher Object Type"::Codeunit); PublObjType::XMLPort: SETRANGE("Publisher Object Type", "Publisher Object Type"::XMLport); PublObjType::Page: SETRANGE("Publisher Object Type", "Publisher Object Type"::Page); PublObjType::Query: SETRANGE("Publisher Object Type", "Publisher Object Type"::Query); ELSE ERROR('PublObjType unknown (%1)', PublObjType ); END; SETRANGE("Publisher Object ID", PublObjID); Subscribers := STRSUBSTNO('Subscribed to %1 %2:\', PublObjType, PublObjID); IF NOT FINDSET THEN Subscribers += 'nothing' ELSE REPEAT Object.GET(Object.Type::Codeunit, '', "Subscriber Codeunit ID"); Subscribers += STRSUBSTNO('Codeunit %1 %2: %3\', "Subscriber Codeunit ID", Object.Name, "Subscriber Function") UNTIL NEXT = 0; MESSAGE(Subscribers); END;
Or you're talking about Object Designer function, something like Go To Definition?Slawek Guzek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-030 -
Exactly. Something to prevent you from searching through endless lists when yon only need the specific ones attached to the publisher you are currently looking at.Slawek_Guzek wrote: »Or you're talking about Object Designer function, something like Go To Definition?
Kai Kowalewski0 -
+1 on that one. Maybe some Connet request... Or whatever it is called now..Exactly. Something to prevent you from searching through endless lists when yon only need the specific ones attached to the publisher you are currently looking at.
Slawek Guzek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-030 -
Connect was closed down, now it's called CollaborateSlawek_Guzek wrote: »+1 on that one. Maybe some Connet request... Or whatever it is called now..
http://aka.ms/Collaborate
Kai Kowalewski0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 333 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

