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 :
Small and medium business | Business Central, N...
Suggested Answer

Can anyone help me How to give different no while inserting a record using Insert() function.

(0) ShareShare
ReportReport
Posted on by 24
 In this image the field No. were repeat the same I need to change this no as P0171 and the next no as P0172 .
I have the same question (0)
  • Kamal Khakhkhar Profile Picture
    1,274 on at
    Hii everyone,
    As per screen shot the record is created from a single order . Like purchase order. The line is contained the fields of header . So if you need to differentiate the record you need to create separately or need to customise the tables.
     
    Thank you,
    Kamal Khakhkhar 
  • Suggested answer
    Deekshitha Reddy Profile Picture
    219 on at
    No. Series can be used to achieve this.
     
     
    Hope this helps.
  • Suggested answer
    Govinda Kumar Profile Picture
    2,304 Moderator on at
    Hi Aarthi Madhavan,

    If you are inserting records through code, you need to select the number series through code to automatically obtain the next number... you can do this as follows..
     
        var
            NoMgmt: Codeunit NoSeriesManagement;
        begin
            Rec."No." := NoMgmt.GetNextNo('NoSeriesCode', WorkDate(), true);
        end;
     
    If the page is a subpage and the data depends on the header record, as we have with sales and purchase order lines, you should select another record just select the subpage records..
     
    I hope this helps.
     
    Regards,
    Govinda Kumar
     

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,229

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,867 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,153 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans