How to save history of latest 10 records?

0
We need to save history of latest 10 records and when 0th record is the recent, 10th record need to be pushed out of queue. Please suggest logic on the same.
asked
2 answers
1

After commimt retrieve history  objects from database with offset 10 ordered on date and delete that list.

answered
0

Hi Rachana,

 

As Chirs mentioned, After commit check the count if more than 10  like 11 then retrieve history as database along with Created date assending order and amount as Count-10 here amount is 1 , and delete that list. 

 

Hope it helps!

Thanks & Regards,

Manikandan K

answered