Today I learned something extrememly useful that I want to not only write down for future use, but to share with everyone else for their benefit as well.
Microsoft Dynamics NAV has both Links and Notes that can be attached to many documents. For example, I had a request from a customer today to block users from deleting Notes. They’re going to be using Dynamics NAV’s Notes extensively to handle a lot of customer requests along with notifications, and comments just aren’t going to work out for them. This can be done, and fairly easily.
You just need to remember that Dynamics NAV stores Notes in the Record Links table. This is one of those system tables in the 2 billion number range, like Users and Permission Sets. You can add code to the OnInsert, OnModify, OnDelete, and OnRename trigger to handle this. Note that DELETELINKS won’t trigger the OnDelete code, so you will have to watch out for that one.
Hopefully, that’s helpful for you. And hopefully, I’ll remember it next time I need to mess with Notes.