• srikanth admin 24
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
Hi all 
Please help me in this program
 
trigger tgname on Account_Convace__c ( after update)
 {
 
         if(Trigger.IsAfter){
                        if(Trigger.IsUpdate){
 
         // Map <id,Account_Convace__c> anjimap = new Map <id,Account_Convace__c>();
          
        List<Messaging.SingleEmailMessage> mails =    new List<Messaging.SingleEmailMessage>();
                   for(Account_Convace__c abc:Trigger.new)
          {
          if( abc.Account__c != Trigger.oldmap.get(abc.ID).Account__c)
             mails.add(abc.email__c); 
             
         
          //for(Account_Convace__c  abcd : [select id, Email__c from  Account_Convace__c  where id in :UPdatedlist])
          
          Messaging.singleEmailmessage mail = new messaging.singleEmailmessage();
          mail.setToaddress(mails);
          mail.setsubject('Account name hsa been changed.');
          mail.setbody('dfdsfdkjsfdsfds');
         
         
         
          }
          messaging.sendEmail( mails);
          
 
 }
 }
 }


Thanks and regards,

Srikanth Annam..
 

what is Next and HasNext  and its difference?