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)
  • Verified answer
    Tech-Lucky Profile Picture
    1,255 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;
  • Verified answer
    YUN ZHU Profile Picture
    89,830 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
  • 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
  • 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.

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…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,899 Super User 2025 Season 2

#2
Sumit Singh Profile Picture

Sumit Singh 2,444

#3
Jeffrey Bulanadi Profile Picture

Jeffrey Bulanadi 2,304

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans