learn4sfdc
Basic Learning about Salesforce.com (SFDC)
Menu
APEX
Apex Trigger
CSS
Data Loader
Eclipse
Integration
Interview Questions
Salesforce Interview Questions.
Showing posts with label
Iterating Map
.
Show all posts
Showing posts with label
Iterating Map
.
Show all posts
Thursday, July 19, 2012
Iterating Map using for loop in Apex Class
You can user keyset() method to iterate over keys in map to fetch values
Apex Class:
Map<String,String> fieldList = new Map<String,String>{‘Name__c’=>’Name’, ‘Age__C’=>’Age’};
for (String fieldName : fieldList.keySet()){
system.debug(fieldName);
}
Older Posts
Home
Subscribe to:
Posts (Atom)