Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public static List<Object> getFieldValues(List<SObject> data, String fieldName){
List<Object> results = new List<Object>();
for(SObject record:data){
results.add(record.get(fieldName));
}
return results;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment