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 22
In the above image the field S.No. use same no while inserting multi record at the sametime.
Categories:
I have the same question (0)
  • Verified answer
    Tech-Lucky Profile Picture
    794 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
    62,477 Moderator 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
    22 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
    8 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

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

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

Product Insights Trigger

Featured topics

Product updates

Dynamics 365 release plans