function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
BNB BaluBNB Balu 

display list of records sorting order is "Recently created".How to achive this?

Best Answer chosen by BNB Balu
Nitesh K.Nitesh K.
You are showing List of Account in sorting order that are recently created use this
 
List<Account> accList=new List<Account>();
for(Account acc:[SELECT Id, Name FROM Account Order By CreatedDate DESC]){
accList.add(acc);
}
accList are in sorted order

Let me know if this helps.