I have 3 classes, and in those classes I have different methods. Those methods I kept in handler class, and this handler class is calling from trigger.
In those classes I have multiple queries on
Contact, based on
Opportunity. What I need is to consolidate those queries, but the main problem is I am calling those multiple methods in trigger from different events (i.e,
Account, (assume that I am getting all ids from
select id, AB2__ABAccountType__c from Account where id in :agencyids, select id, Name FROM Account WHERE Id IN :acctIds, select id from Account where id in :WalmartAccounts
Contact (assume that I am getting all ids from
select id, Account.Type from Contact where id in :contactids, select id from Contact where id in :WalmartContacts