Skip to content

Instantly share code, notes, and snippets.

@gitmatheus
Created May 31, 2017 14:46
Show Gist options
  • Save gitmatheus/03f5fefd61fa103e81ef93c55555986c to your computer and use it in GitHub Desktop.
Save gitmatheus/03f5fefd61fa103e81ef93c55555986c to your computer and use it in GitHub Desktop.
SObject[] sObjectAccounts = new SObject[]{ new Account(Name = 'Account Name') };
processCustomObject(sObjectAccounts);
// Using a list of sObject Accounts as a parameter (that expects a list of Custom Objects).
private void processCustomObject(Custom_Object__c[] customObjects) {
//for (Custom_Object__c customObj : customObjects) System.debug(customObj.Name);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment