function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
How can i write an soql to fetch records from an object with created date as the most recent present in system?
Try this ->
list <account> lacc = [select id from account order by createdDate DESC limit 1];
All Answers
Try this ->
list <account> lacc = [select id from account order by createdDate DESC limit 1];
I have tried this query, in query editor it's fetching correct result but in code it's not working properly.