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 NAV (Archived)

Start Integer field from 1000 ???

(0) ShareShare
ReportReport
Posted on by

hi all,

i have a primary key field with type of integer and autoincrement = true, i want when i insert the record the primary key field start from 1000.

*This post is locked for comments

I have the same question (0)
  • KTA Profile Picture
    1,200 on at

    I guess that you've tried InitValue=1000 but that goes against the autoincrement

  • Community Member Profile Picture
    on at

    KTA picture

    I guess that you've tried InitValue=1000 but that goes against the autoincrement

    InitValue = 1000 not working

    i want just like sales order line, Where Line No. start from 1000

  • KTA Profile Picture
    1,200 on at

    You can try a different approach maybe it isn't the more efficent one but it should work. Instead using autoincrement you can use findlast and if there's one use previous+1 and if not =1000

  • Community Member Profile Picture
    on at

    @KTA

    actually the main problem is  assign 10000 to primary key and it will also be increment by 10000

  • bharathkarunakaran Profile Picture
    475 on at

    Hi,

    Please go the page where you have added that field and in the properties of that page give autosplitkey = "YES" and you will get you desired output.

    I have  answered upto my understanding.

    Regards,

    Bharath K

    Please mark it as verified if found useful.

  • Suggested answer
    Suresh Kulla Profile Picture
    50,247 Super User 2025 Season 2 on at

    Open the table and manually insert a record with value 999.  Then the code or process will automatically increment based on that value so the next value will be 1000....

  • KTA Profile Picture
    1,200 on at

    [quote user="Tanveer Ahmad"]

    @KTA

    actually the main problem is  assign 10000 to primary key and it will also be increment by 10000

    [/quote]

    In the first one because you couldn't find last record, i would be solved. Like this:

    IF (rec.FINDLAST) THEN

      Number:=rec.Number+1

    ELSE

      Number:=10000;

    You can also use Suresh idea and make one entry of 999 and then autoincrement will work

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 NAV (Archived)

#1
HoangNam Profile Picture

HoangNam 7

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans