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
Anoop Kumar 31Anoop Kumar 31 

write a soql query to fetch 500 account records in a list and convert it into a map of accountid and account record

Please answer anyone??
Shweta AlwaniShweta Alwani
Try to use this,

Map<Id, Account> accountMap = new Map<Id, Account>([SELECT ID, Name FROM Account LIMIT 500]);
v varaprasadv varaprasad
Hi Anoop,

 Check below URL :
https://www.youtube.com/watch?v=Us9x9GyuRj8&t=5s


Hope this helps you!
If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others.

Thanks
Varaprasad
@For SFDC Support: varaprasad4sfdc@gmail.com
Blog: http://salesforceprasad.blogspot.com/

Salesforce latest interview questions  :
https://www.youtube.com/channel/UCOcam_Hb4KjeBdYJlJWV_ZA?sub_confirmation=1​