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 :
Microsoft Dynamics AX (Archived)

Difference between insert method and RecordInsertList method

(0) ShareShare
ReportReport
Posted on by

Hi,

We have inserted data in our table by code with the help of insert method in AX 7 but when I generated CAR (Customization Analysis Report) it is giving warning to use RecordInsertList method instead insert. I am inserting one record at a time and it seems no use of RecordInsertList. Can anyone please tell what is advantage of using RecordInsertList instead of insert method when I am inserting one record at a time.

Regards,

Smit

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    237,987 Most Valuable Professional on at

    RecordInsertList is a class, not a method. You can learn more about it in documentation:

    I believe CAR looks for inserts inside loops, with the assumption that instead of calling database every time (e.g. 100 executions => 100 database calls), you could put records into a RecordInsertList and insert all records in a single DB statement.

    If your loop execute just once, but then you should get rid of the loop.

    Maybe you can't use RecordInsertList with your current code, but then maybe you should redesign your solution.

    But of course, the tool is quite simply and you may have a legitimate reason to violate this rule, although I can't currently think of any. Show us your code if in doubt.

    CAR

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans