NAV2017 Notifications Part 3: more about the ID

So today a colleague referred me to this page on MSDN where it states the following about the ID:
If left unassigned the notification will be assigned an ID when the SEND method is called. For more information, see SEND Function (Notification).

So this sounds like giving your own unique ID to the notification is not that necessary at all, right?

After some testing it appears not to be that easy..
As I mentioned in my first blog post about notifications a notification without a unique ID can cause a huge stack of duplicate notifications on your screen and we DO NOT want that at all.

If you leave the ID empty and you let the SEND function generate an ID for you, the ID will be kept in memory BUT only if the notification variable is kept somewhere global (I hope you won’t even consider doing this)
You can think of all kind of fancy functions that will return the ID that the SEND function has generated for you, but in my perception the way to go is to create a function per notification to retrieve the hard coded guid.
P.S. this is also the way Microsoft is doing it.

MS Connect Suggestion: Disable GUI in Test Functions

Since C/AL unit tests run in a client session GUIALLOWED will always be TRUE, if code behaves differently in case of GUIALLOWED = FALSE it’s not possible to actually test that code.

Especially when testing web services it would be great if you could just disable the UI in a test function.

Please vote here!

A bit off topic but in my opinion it should be possible to run unit tests without UI, how cool would it be if you can just call the Invoke-NAVCodeunit Cmdlet to test your code!?
Technically this is possible but a lot of standard NAV tests will fail because of unexecuted UI handlers…