Skip to content

Instantly share code, notes, and snippets.

@arun12209
Created July 14, 2023 10:52
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save arun12209/1d690ca9c07e6b71b33d10b2cbb3b913 to your computer and use it in GitHub Desktop.
Set<Id> accountIds = new Set<Id>();
for (Contact con : [SELECT Id, Name, AccountId FROM Contact WHERE Account.Name = 'Some Account']) {
accountIds.add(con.AccountId);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment