You need to sign in to do that
Don't have an account?
Order by Created Date is working in sandbox but not in Production
I am facing a sorting problem. I am using order by CreatedDate command which is working in sandbox but not in Production.
Code :
List <Lead> ld1 =[Select id,Name from lead where id IN:ld order by createddate desc limit 2000 ]; public Lead[] getNumbers() { try { Lead[] numbers = [select Name from Lead where id IN:ld1 order by createdDate asc limit :list_size offset :counter]; return numbers; } catch (QueryException e){ ApexPages.addMessages(e); return null; } }
I find out the issue. Standard Controller was returning only 20 records at a time. So I was getting wrong result.
All Answers
I find out the issue. Standard Controller was returning only 20 records at a time. So I was getting wrong result.