function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
swapna muthiyaluswapna muthiyalu 

hi all, My requirement is to add the filterCas as attachment in email and send? i have the following code

Map<id,case> csmap = new Map<id,case>([select id,(select id,Type__c,Activities__r ) ,                  
                CaseNumber from case ];
list<Case> filterCas= new list<Case>();
 list<Activity__c> li = new list<Activity__c>(); 
for(case tempcase:csmap.values()){  
   for(Activity__c ac:tempcase.Activities__r){
       if (ac.Type__c == 'Info'){  
              system.debug('fitered Case'+ filterCas);
             Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
             String address = '';
             String subject = 'List of Records';             
        String[] toAddresses = new String[] {address};
        Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });


swapna muthiyaluswapna muthiyalu
Any help on this Please