Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

the note id has not been set

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?


NOTE_5F00_56.png

RomRyan

*This post is locked for comments

  • 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. 

    Tim.

    /*

    ** 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)

    go

    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 ' + o.name + ' insert ##GPSMaxNote values(@NoteIndex)'

        from sysobjects o, syscolumns c

        where o.id = c.id

           and o.type = 'U'

           and c.name = '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)

      begin

      exec (@cStatement)

      fetch next from T_cursor into @cStatement

      end

    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

    RomRyan

    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.

    THANKS!

  • 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.

    Thanks

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans