• ashishrai4u
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies

I have a trigger which having nested  if and else conditions.If i use more DML  soql then i am reaching  the governor limit. I have only covered only 40%.So is there any alternative  way of testmethod to cover Trigger coverage . Below is the sample code of trigger.Please help me its very urgent.

 

 

If(E.whoid==Eold.whoid)  
{    
 if(Unew[0].FirstName=='Abhey')
          {
              if(Tnew.size()>0)
                {
                      if(EO1.size()>0)
                             { 
                                    if(Uold[0].FirstName=='Heather')
                                     {
                                        
                                         if(Told.size()>0) 
                                             {
                                                   if(EO2.size()>0)
                                                    {
                                                    
                                                            if(EO2[0].ActivityDate >= Told[0].ActivityDate)
                                                                  {
                                                                 
                                                                 }
                                                            else
                                                                {
                                                         
                                                                }
                                                }

Thanks.

 

Can portal user set a security answer ?? is there any way to implement this for the portal user??

i need this for Site implementation..

 

 

thanks

Hi all,

   can any one help we the exact httpreqest with access token . I am using this but getiing a response "Bad_OAuth_Token" which comes when you are passing the wrong token.  

 

httprequest hreq=new httprequest();

hreq.Setendpoint('https://login.salesforce.com/id/00D90000000aSjoEAE/00590000000eb7cAAA');

hreq.setmethod('POST');

hreq.setHeader('Authorization: ','OAuth 00D90000000aSjo!AQgAQNfbCS3aunHX37ko2VhwXzk4holpYFrU9juuCIMdanXC54DAjI916nYNvzZHjOV2vRubCiT1XZGeongMBAVxtdMfpLlN');


hreq.setHeader('Host','https://ap1.salesforce.com');

http htp=new http();

httpResponse res=htp.send(hreq);system.debug('%%%%%%%%%%%%%' +res);

System.debug('@@@@@@@@' +res.getBody());

 

Can any one help me on this???????????????