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
Manoprabha PalpandianManoprabha Palpandian 

any one of you help me how to display the state and country names using map method

Suraj Tripathi 47Suraj Tripathi 47

hi,

Please find the solution.
 

map<Id,Account> mapName=new map<Id,Acccount>([Select id,BillingCity,BillingState from Account limit 1000]);

for(Id id1:mapName.keySet()){
system.debug('City=>'+mapName.get(id1).BillingCity);
system.debug('State=>'+mapName.get(id1).BillingState);
}

Please let me know it is working or not??

Please mark it as the Best Answer if it helps you.

Thank you

Manoprabha PalpandianManoprabha Palpandian
thank you Suraj it is work