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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Looping through recordInsertList

(0) ShareShare
ReportReport
Posted on by 1,552
Hi,
 
if we have recordInsertList filled..is there a way to loop through it and take the values? Is there sth like listEnumerator to use?
I have the same question (0)
  • Suggested answer
    GirishS Profile Picture
    27,827 Moderator on at
    Looping through recordInsertList
    Hi JuniorAx,
     
    There is a method named toString method - Call this method and check whether it's returning the list values.
    If not, then there is no method available in RecordInsertList to loop through the records.
    You need to create your own List type variable and insert into it, while adding the records to RecordInsertList using add method.
    Later you can use the ListEnumerator to loop through all the records.
     
    Thanks,
    Girish S.
  • Suggested answer
    Martin Dráb Profile Picture
    237,658 Most Valuable Professional on at
    Looping through recordInsertList
    If you need such a thing, your design must be wrong. If you explain your business requirements to us, we can help with designing a technical solution that can actually do the job.
     
    You seem to think that the purpose of RecordInsertList is to store a list of records in memory, but that's not the case. You can use other classes for that, such as List or RecordSortedList, or to utilize a temporary table. RecordInsertList is used for inserting records on batches. For example, let's say you added 950 records there (and didn't call insertDatabase() yet. You may find that 900 records were already insert to DB (in nine batches of 100 records) and only 50 are waiting to be inserted. You can't find all those 95o records in the RecordInsertList object.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 776 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 606 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 402 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans