Skip to content

Instantly share code, notes, and snippets.

@sfmishra
Last active September 10, 2019 12:42
Show Gist options
  • Save sfmishra/2630638a53fe8c1772edaf2539292d4b to your computer and use it in GitHub Desktop.
Save sfmishra/2630638a53fe8c1772edaf2539292d4b to your computer and use it in GitHub Desktop.
Set<Id> accId = new Set<Id>();
for(Account acc : [SELECT Id, Name FROM Account LIMIT 10]) {
accId.add(acc.Id);
}
system.debug(accId);
String str = ''+accId;
system.debug(str);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment