• Peti
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
Good day, i am new with SF development,a dn need to desperatelly create a class to test for this trigger.  This trigger essentially rolls up some values for opportunities that are attached to an account as a partner.  even if you guys can get me going I can keep up and work on the rest.

thanks,

trigger TotalOppVerifiedValue on Account (before update)
{
List<Opportunity> opplist=new List<Opportunity>();
List<Double> crr=new List<Double>();
 Double TotalAmt=0;
 for (Account acc:Trigger.new)
    {
  //   System.debug('######@@@@@@@@@'+acc);
  //List<Partner> prn=[Select Opportunityid from Partner where AccountfromId=:acc.id];
          for(Partner prn1:[Select Opportunityid from Partner where AccountfromId=:acc.id])
          {
          // System.debug('!!!!!@@@@@@@@@'+prn1);
          //  opplist.add(prn1. Opportunityid )
             for (Opportunity opp:[Select Verified_Value__c from Opportunity where id=:prn1.Opportunityid ])
             {
            
           //   System.debug('$$$$$$$$$$$$@@@@@@@@@'+opp);
               crr.add(opp.Verified_Value__c);
              
               // acc.Total_Verified_Value_for_Opps__c=opp.Verified_Value__c
             }
        //  System.debug('@@@@@@@@@'+crr);
         
          }
             for(integer i=0;i<crr.size();i++)
                {
                   TotalAmt += crr[i];
                }
        acc.Total_Verified_Value_for_Opps__c=TotalAmt ;
    }
  
  
  

}

 

  • January 21, 2012
  • Like
  • 0

Hi champs..

 

I am very new to salesforce and apex programming.

 

I am trying to stop an email notification (when case status is set to completed) sent from an apex trigger. I tried setting the EmailHeader.triggerUserEmail = false but it does not seem to work.

 

is there any other way i can stop this notification.

 

Thanks in advance.........


Regards,

Din

  • August 03, 2011
  • Like
  • 0
hello all,

how to show printable view for visualforce page.
please help me out.

thanks
  • May 15, 2008
  • Like
  • 0