Skip to content

Instantly share code, notes, and snippets.

@capeterson
Created October 9, 2015 17:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save capeterson/ead27ab7019d9444224e to your computer and use it in GitHub Desktop.
Save capeterson/ead27ab7019d9444224e to your computer and use it in GitHub Desktop.
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