+ 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 are in sorted order

Let me know if this helps.