Fixing missing Note Index values

This is a reposting of an article I originally wrote on my Developing for Dynamics GP blog.
A recent newsgroup post asked about how to fix the error message shown below from occurring when clicking the Attach button on the Note window for a record level note.
“The note ID has not been set.”
