web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

smGetNextNoteIndex and creating new note

(0) ShareShare
ReportReport
Posted on by 70

I have procedure which makes new note. It basically consists of three steps:

1. Call DYNAMICS.[dbo].[smGetNextNoteIndex] to get new note index

2. Call [dbo].[zDP_CN00100SI]

3. Make INSERT INTO dbo.CN00300

This procedure is called from external application in a loop (up to 10K calls). All is working fine until the application is the only process which modifies notes.

But, if in the same time, user opens GP, goes into Sales -> Collection Main, queries for some records and clicks on “New Note” – then GP shows error message “GetNoteIndex returned an existing CN_Note_Text record index. Getting new index.”.

If to ignore it and try to save new note, other error is occurred: “A save operation on table ‘CN_Notes_Text’ has created a duplicate key.”

I suggest that GP itself also uses smGetNextNoteIndex to get new note index, so such error cannot theoretically occur. Or am I wrong somewhere?

*This post is locked for comments

I have the same question (0)
  • Tim Foster Profile Picture
    8,515 on at

    Please see:

    blogs.msdn.com/.../understanding-notes-and-the-note-index-field.aspx

    Tim

  • Aleksei Vassiljev Profile Picture
    70 on at

    Thank you, but that post does not give the answer. I don't have the Cross Linked Notes problem related to databases restoring, and note index value is correct. There is no errors when actions are performed separately - I can insert thousands notes from external application (calling smGetNextNoteIndex of course), and then user can add notes from GP interface. The problem arises when user tries to use GP in the time when application runs and generates notes.

  • Tim Foster Profile Picture
    8,515 on at

    The post DOES contain the answer in the comments.

    smGetNextNoteIndex generates a note index for SY03900 Record Notes.

    You are inserting notes into the Collections Management Note tables, which are completely separate from GP because Collections is a third party product.

    I don't know where the Collections note Index is stored.

    Tim

  • Verified answer
    Tim Foster Profile Picture
    8,515 on at

    The Note index you're looking for is in CN40101.

  • Aleksei Vassiljev Profile Picture
    70 on at

    yep, thanks, it's CN40101

    And a little note: table SY01500 stores the next (non used) index value, but CN40101 stores the current (already used) index value.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans