Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set<Id> accIds = new set<Id>();
- for(Account acc : Trigger.new)
- {
- accIds.add(acc.id);
- }
- //query the contact records now from currently processed Account Ids
- List<Contact> lstContact = [select id from contact where Accountid in : accIds];
- List<Contact> lstContact = [select id from contact where
- Accountid in : Trigger.newmap.Keyset()];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement