Skip to main content
Microsoft Dynamics GP forum

the note id has not been set

editSubscribe (0) ShareShare
Posted on by

Dear All,

I am encountering this issue when attaching a note to a PO item.

Have any one encountered this issue??

What is the solution?



  • Jozy Profile Picture
    Jozy 385 on at
    RE: the note id has not been set

    Not worked..:(

  • Tim Wappat Profile Picture
    Tim Wappat 5,701 on at
    RE: the note id has not been set

    The following script is not mine, but one we use for after we restore test company from live to reset the note ids in the system database. 

    Note if your system database is named anything but DYNAMICS you will need to update the name in the script before running the script against the company database in question.

    As always check this script in your test system and reassure yourselves you are happy to run in production and have backups when running against live. It checks for the max note id over all the tables in the database then sets the setup table according to the max. 



    ** FindMaxNoteIndex.SQL


    ** Purpose:


    ** Find the max value of NOTEINDX from all tables.


    ** This script must be run against the company in which the notes are incorrect.

    ** it will automatically update your SY01500 for you to the correct next note index.


    ** Modified by MRO


    if exists (select * from tempdb..sysobjects where name = '##GPSMaxNote')

    drop table dbo.##GPSMaxNote

    set nocount on

    create table ##GPSMaxNote (MaxNoteIndex numeric(19,5) null)


    declare @cStatement varchar(255) /* Value from the t_cursor */

    declare @noteidx numeric(19,5)

    declare @database as varchar(5)

    set @database = cast(db_name() as varchar(5))

    /* Get the tables that have a column name of NOTEINDX. */

    declare T_cursor cursor for

    select 'declare @NoteIndex numeric(19,5) select @NoteIndex = max(NOTEINDX) from ' + + ' insert ##GPSMaxNote values(@NoteIndex)'

        from sysobjects o, syscolumns c

        where =

           and o.type = 'U'

           and = 'NOTEINDX'

    /* Ok, we have the list of tables.  Now get the max value of NOTEINDX from each table. */

    open T_cursor

    fetch next from T_cursor into @cStatement

    while (@@fetch_status <> -1)


      exec (@cStatement)

      fetch next from T_cursor into @cStatement


    deallocate T_cursor

    select 'Max Note Index:', max(MaxNoteIndex) from ##GPSMaxNote where MaxNoteIndex is not null

    use DYNAMICS

    set @noteidx = (select max(MaxNoteIndex) from ##GPSMaxNote where MaxNoteIndex is not null)

    update SY01500 set NOTEINDX = (@noteidx + 1.0) where INTERID=@database

    set nocount off

  • Peggy L. Aitken Profile Picture
    Peggy L. Aitken 240 on at
    RE: the note id has not been set


    How was this resolved.  I'm getting the same error when trying to attach a note to an SOP Return.  I'm trying to find the next note # in each of the tables listed in the resolution but only find the NOTEINDX field in the SY01500 and the SY03900.  That field doesn't exist in the SY01400.  

    In my case the NOTEINDX in the SY01500 for this company is 1291379.00000 while the last number in the SY03900 table is 1237126.00000. 

    How does this happen and do I update the SY03900 to be 1 greater than the # in the SY01500 for that same company?

    How does the SY01400 come into play since that field isn't present in that table.


  • RE: the note id has not been set

    Usually with these type of errors, the note index field is not setup correctly.

    Check the next note index field for this company in the SY01500 system table, then you need to compare against the SY03900 table to make sure the index in the SY01400 table is greater than the index in the SY03900 table.

    Then, in the example of the PO Entry window, the PO would need to be tired to the note showing in the SY03900 table for it, by having the same note index number value, in what appears to be the PONOTIDS_1 column of the POP10100 table, for that PO.

    I would start with this and see what that shows you.


Helpful resources

Quick Links

What Motivates a Super User?

We know many of you visit the Dynamics 365 Community and Power Platform…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…


Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,066 Super User

Martin Dráb Profile Picture

Martin Dráb 222,585 Super User

nmaenpaa Profile Picture

nmaenpaa 101,138

Product updates

Dynamics 365 release plans