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

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

To change the auto increment value while inserting a multi record at the same time.

(0) ShareShare
ReportReport
Posted on by 24
In the above image the field S.No. use same no while inserting multi record at the sametime.
I have the same question (0)
  • Suggested answer
    NB-26050925-0 Profile Picture
    12 on at
    To change the auto increment value while inserting a multi record at the same time.
    You can set autoincrement property on S.No. field and try to insert record.
  • Aarthi Madhavan Profile Picture
    24 on at
    To change the auto increment value while inserting a multi record at the same time.
    Hi Nitesh Bhoir I already set autoincrement  property on S.No. field
  • Verified answer
    YUN ZHU Profile Picture
    93,151 Super User 2025 Season 2 on at
    To change the auto increment value while inserting a multi record at the same time.
    Hi, is this a custom page?
    If you are customizing, you can refer to the Entries table, find the last line, and then add 1 for the entry no in your code.
    Or you can try AutoSplitKey Property.
     
    Hope this can give you some hints.
    Thanks.
    ZHU
  • Verified answer
    Tech-Lucky Profile Picture
    1,261 Super User 2025 Season 2 on at
    To change the auto increment value while inserting a multi record at the same time.
    You can simply write this code on Table's on Insert Trigger  and change the Variables accordingly.
     
        trigger OnInsert()
        var
            CustomTable: Record CustomTable;
        begin
            CustomTable.Reset();
            CustomTable.SetCurrentKey(EntryNo);
            if CustomTable.FindLast() then
                EntryNo := CustomTable.EntryNo + 1
            else
                EntryNo := 1;

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 3,750

#2
Sumit Singh Profile Picture

Sumit Singh 2,689

#3
YUN ZHU Profile Picture

YUN ZHU 1,987 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans