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