Developing for Dynamics GP

by David Musgrave (Perth, WA, Australia) and the Microsoft Dynamics GP Developer Support Team (Fargo, ND, USA)

Fixing missing Note Index values

Fixing missing Note Index values

  • Comments 7

David Meego - Click for blog homepageA 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." 

The cause of the message is that the 'Note Index' value for the Transaction or Master record has not been set and so remains at zero. 

The post Understanding Notes and the Note Index field explains how the Note Index is used and where the next Note Index comes from.  It also explains how cross linked notes can occur.  This post will discuss missing Note Index values and how they can occur. 

The usual cause is because the data has been imported in some way and the import process did not populate the 'Note Index' field. Depending on what the import process actually is, you might need to log this issue with support so that it can be fixed. 

Also, If you can make this problem occur for a master record or transaction newly entered via the user interface, then there is a bug in the code for that window and you will need to log this issue with the developer.

So, once there is data with a missing Note Index value, how can we fix it.... The answer is "easily".

My friend, Robert Cavill, provided me with a script he had created which can scan a table for missing 'Note Index' values. The script updates the table with the next Note Index for the company. It does so by using the existing DynamicsGP stored procedure: smGetNextNoteIndex. This AssignNoteIndex.sql script is attached to the bottom of this post. You just need to specify the table name to process by editing the value at the top of the script.

Before using AssignNoteIndex.sql, I would suggest running the script in the Knowledge Base (KB) article Cross-linked or incorrect notes indexes in Microsoft Great Plains (KB 872678) Secure Link. This will ensure that the Note Index values used are higher than any existing values.  The FindMaxNoteIndex.sql script from this KB is also attached to the bottom of this post.

Should you make regular use of the sample company Fabrikam (TWO database), I would also suggest running the FindMaxNoteIndex.sql script on this database as well. This is especially worthwhile if you have third party products that have added sample data.

The AssignNoteIndex.sql script and the FindMaxNoteIndex.sql script are available from the attachment at the bottom of this post.  They can be executed against any company database.

For other posts on the topic of Notes and OLE Attachments see the following posts:

Understanding Notes and the Note Index field 

OLE Attachments and Record Notes

All about the Dexterity OLE Container

Copying Record Notes and OLE Attachments between Companies

I hope you find these scripts useful.

David

Attachment: SQL Note Index Scripts.zip
  • Posting from DynamicAccounting.net

    http://msdynamicsgp.blogspot.com/2010/02/fixing-note-index-values-in-dynamics-gp.html

  • Posting from Mohammad Daoud

    http://mohdaoud.blogspot.com/2010/02/note-id-has-not-been-set.html

  • Posting from Sivakumar Venkataraman

    http://cvakumar.com/msdynamics/2010/03/01/updating-missing-note-indexes-in-tables/

  • Hello,

    Is there any way to create a note on an invoice using the web services?

    We need to use the web services to add some notes to the invoice. I have searched a lot but couldn't find a way to do so. Can you please guide me to a way to do so?

    Do I need to handle it using OLE or so? or do I need to set a certain property in PayablesInvoice instance before sending it to the CreatePayablesInvoice webservice method? or there is another method to add a note to any GP entry? Please advice.

    Thanks!

  • Hi Mohammed

    Blog comments should not be used for technical support.  I would suggest using the forums, but I think you already did:

    social.microsoft.com/.../0572e941-e96a-4e0c-977d-9d0470be000d

    Hopefully Chris' answer is what you needed.

    David

  • David,

    I want to thank you for the post. I've tweaked SQL Note Index Scripts to fix duplicate NOTEINDX values in FA00100 table.

  • Hi there Dave!

    You have yet again put together something that really helps clients that are in a bind, especially those that experienced issues with modules that are not supported by Notefix. Good one! Keep up the great job that you are doing and I do hope that you will get more recognition on your work!!

    Mielyn N.

Page 1 of 1 (7 items)
Comments Information

PLEASE READ BEFORE POSTING

Please only post comments relating to the topic of this page.

If you wish to ask a technical question, please use the links in the links section (scroll down, on right hand side) to ask on the Newsgroups or Forums. If you ask on the Newsgroups or Forums, others in the community can respond and the answers are available for everyone in the future.

Leave a Comment
  • Please add 6 and 4 and type the answer here:
  • Post