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

I have a account obj and contact obj?i want to retrive the account records?how do u query it?

Hi Muneendar Baddam,

Use this query to retrieve  accounts.
List<Account>acc=[select id,name,type,description from account limit 50000];

Deepak Kumar ShyoranDeepak Kumar Shyoran
You can use simple SOQL to get the all accounts or Contact Object.

List<Account> accList = [Select id,Name from Account ] ;
List<Contact> conList = [Select id,LastName from Contact ] ;

in addition you can use additional fields api name to fetch them.