Update table using recordSortedList

Hi All,

I have a requirement to update a record if the the corresponding record already exists. How can I update a table using recordSortedList ?

I used the following line for reference. But it is not helping much.




If you want to update it inside RecordSortedList, just use the second parameter of ins() method.

But if you want to update it in DB, RecordSortedList won’t do it for you. As you can read in documentation, the RecordSortedList class inserts multiple records in a single database trip. Nevertheless you can iterate through records in the RecordSortedList and call write() individually.