I want to create a map of apiname and value pair..please help... i want record value...like if apiname of opportunity field is name..then i want record value..ie opportunity name...
for eg
Map<String, Schema.SObjectField> fieldMap = leadSchema.getDescribe().fields.getMap();
Opportunity opp=[Select id,name,accountId from Opportunity];
Map<String,string> valueMap=new Map<String,String>();
for(opportunity o:opp)
{
for(String fieldName: fieldMap.keySet())
{
**valueMap.put(fieldName,o);**
}
}