
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)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