Skip to content

Instantly share code, notes, and snippets.

@krystiancharubin
Created March 11, 2016 03:14
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 krystiancharubin/9793dd3eb9bb515c3275 to your computer and use it in GitHub Desktop.
Save krystiancharubin/9793dd3eb9bb515c3275 to your computer and use it in GitHub Desktop.
private static boolean checkConditions(SObject record, Map < String, Object > conditionals) {
for (String field: conditionals.keySet()) {
Object value = record.get(field);
Object condition = conditionals.get(field);
if (value != condition) return false;
}
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment