In a customer service module, while user is sending an email and searching for a contact and account ( to fill up CC, BCC, To etc) only contact and accounts associated with the particular cases would come in search results. Any pointer of implementing the functionality.