I have a custom setting where I have fields api name and getting the field api name and use with sObject. At that time I am getting error cannot use string with the sObject. How can I convert the string to a sObjectField or is there any other way to do it. my code
Map<String, SObjectField> fieldMap = SObjectType.CVSR__Visit__c.fields.getMap();
for(String fieldName : map_customSet.keyset()){
system.debug('field map ' + fieldMap.get(fieldName));
SObjectField sObjfieldName = fieldMap.get(fieldName);
//system.debug('Visit Field ' + v.sObjfieldName );
}