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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

RecordInsertList. Insert Database()

(0) ShareShare
ReportReport
Posted on by 56

Hi team,

I came to know the new concept Insert Database. before I used Insert_Recordset.

whst is the difference between  Insert_Recordset. and InsertDtabase ?

Kindly elaborate me pls how InsertDtabase wiil work ? and when it exactly required to use?

Pls give me more shed on this.

thanks!

  • Martin Dráb Profile Picture
    240,902 Most Valuable Professional on at

    It's impossible to answer before you explain what you mean by "the new concept Insert Database". Don't you actually mean insertDatabase() method of a class and you forgot to mention which class it is? My guess is that you mean RecordInsertList. If so, you'll find a plenty of information on the internet, because it's nothing new.

    It's a pity that you still don't know how to describe your question after all the years here, the hundred threads and all the advice you got.

  • Verified answer
    GirishS Profile Picture
    27,843 Moderator on at

    Hi,

    Insert_Recordset is a keyword in D365 which will be used to insert multiple records at a time. For example, you are looping all the records and inserting records one by one into table using while select, instead of that you can use Insert_Recordset which will increase performance.

    InsertDatabase is a part of RecordInsertList functionality.

    InsertDatabase will be called after you add all the records to the table buffer and finally call the InsertDatabase.

    InsertRecordset is mainly used to increase performance. If you write normal insert, it will call database for each insert.

    But if you use InsertRecordSet one single call to the database is enough to all the records that is using InsertDatabase method.

    Table1 tempTable1;
    Table2 tempTable2;
    RecordInsertList insertList = new RecordInsertList(Tablenum(Table2));
    While select * from temptable1
    {
        tempTable2.Field1 = temptable1.Field1;
        //add all the buffer value to RecordInsertList using add methiod.
        insertList.add(tempTable2);
    }
    //after the completion of while select and adding all the buffer values to RecordInsertList
    call the insertDatabase method to insert all the record at one database call.
    insertList.insertDatabase();

    Thanks,

    Girish S.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 455 Super User 2026 Season 2

#2
CU10121822-0 Profile Picture

CU10121822-0 376

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 47 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans