[Suggestion] Create Subscribers at runtime / Generic Subscribers
I'm writing this suggestion because I've had multiple scenarios where I would've liked to create subscribers at runtime. The example I'm going to use here is a very simple example to get my point accross, it is in no way a real life example.
The problem: Let's say we have a NavUser who wants a message box to pop-up with the No. and Name of the customer whenever he opens the Customer Card. Very easy extension to create, we just create a subscriber to the OnOpenPage trigger of the customer card. Done. Few days later the NavUser asks you to do the same for the Vendor Card and some more Cards. Now when I get something like this, my 'GenericCode-Sense' starts tingeling and I just want to create something generic with Variants and Recrefs where the customer himself gets to decide what he sees and on which page.
Now here lies the problem, no matter how generic I create my solution I am stuck on the fact that I need to create subscribers on any page that I think my NavUser will want to have this functionality.
Easy Solution: A quick and easy Solution for this would be if you guys created an OnOpenPage in codeunit 1 just like we have OnDataBaseModify etc... But just like its counterparts this wouldn't be a very good solution since it would probably slow down the system. +We would expect you to create OnQueryClose, OnNewRecord etc...
Subscribers at RunTime solution: So what I have in mind is something similar like how you implemented workflows. But instead of workflows we fill in the Event Subscriptions Table at RunTime.
Step1: Subscribe to the new EventSubscriptions Publisher
So in the Event Subscriptions Codunit there would be a Publisher where you can subscribe to if you want to add events at runtime.:
Publisher OnAddSubscriptionEventsToLibrary()
When you subscribe to this you can call the Event Subscriptions codeunit's new function to create a new subscription:
EventSubscriptionsMgt.CreateEvent(SubscriberCodeunitId,SubscriberFunction,EventType,PublisherObjectType,PublisherObjectId,PublisherFunction);

So for our example this would look like this:

Step2: Create your own Generic Subscriber
As you can see in my previous step I referenced 50000 and MyOnOpenPageSubscriber. Well this will be my Generic Subscriber.
The code for this is actually the same as you would create a normal subscriber except that you do not give an object id, the Default Parameters are variants and a new Parameter with the ObjectNo :

I believe this would open up a lot of cool possibilities.
Update:Images
+1
It would be great if I could subscribe to events without having to create a dependency. That's kind of the point of events in the first place.