4 answers
Please see below code List<SObject> listObjectRecords = database.query('select ' + cusFields + ' from '+ objName + ' WHERE ID = \'' + objId + '\''); for(SObject sObj : listObjectRecords ) {Map<String,Object> mapObj = (Map<String,Object>)Json.deserializeUntyped(Json.serialize(sObj));}listObjectRecords returns me a list which is used to build map<string,object>. Here String is name of the field and Object is value of the field. But i need this as Map<String,String> instead of Map<String,Object>