• Akash
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 10
    Replies

Hi,

 

I would like to tell you sometthing  that i have faced during my Code deployment from sandbox to production.

 

I was having one Class ( MoveProdClass )that needs to be deployed on production. I have created a TestClass for the same & its showing more than 90% coverage when i did test run on my sandbox Org. but as i tried to move this code to production the coverage got decreased & it never went up more than 67%. i tried everything but no success. In the process when i was redeploying my code i selected a blank TestClass  with MoveProdClass & it was deployed to production. i tried the same again & i found success again.

 

I want to share this with you all because i just want to know that is there any internal salesforce problem or what else.

 

 

regards,

Akash

 

  • February 03, 2009
  • Like
  • 0
Hi,

I am trying to attach an attachment in email for test method but I am not able to attach it. My code for email method is:

global Messaging.InboundEmailResult handleInboundEmail(Messaging.inboundEmail email,Messaging.InboundEnvelope env)
    {
        Messaging.InboundEmailResult result = new Messaging.InboundEmailResult();      
        string FileNames='';
        Integer RecCounter = 0 ;
        Integer ColCounter = 0 ;
                     
         List<Messaging.InboundEmail.TextAttachment> Obj =  new List<Messaging.InboundEmail.TextAttachment>();
         string UniquePhoneNumbers = '';
               
                                    
        if (email.textAttachments != null)
        {                                  
                //Attahcment found...
                Obj  = email.textAttachments;          
                Integer i;
}
}

and test method code is:

public static testMethod void testTasks() {

// Create a new email and envelope object
Messaging.InboundEmail email = new Messaging.InboundEmail();
Messaging.InboundEnvelope env = new Messaging.InboundEnvelope();


List<Messaging.InboundEmail.TextAttachment> objList =  new List<Messaging.InboundEmail.TextAttachment>();
Messaging.InboundEmail.TextAttachment obj = new Messaging.InboundEmail.TextAttachment();

obj.body = 'test';
obj.fileName = 'C:\test.vcf';
obj.mimeTypeSubType = 'application/octet-stream';

objList.add(obj);

email.textAttachments = objList;
}

The test method is not taking the attachment.

Can you please help me in attaching an attachment in my test method? Please treat this as very urgent.

Thanks
  • September 26, 2008
  • Like
  • 0
Hi

  I am facing a serious Issue with Trigger Bulk Data Manipulation. I need to insert & delete in bulk with the help of a trigger.
  but the problem is that trigger having limit to process 100 DML records. I have tried it using a class & then used the class method in trigger but no success. if anybody did bulk insertion,deletion of more than 100 records through trigger then plz help me out.
its urgent ...


regards,
Akash.....salesforce.com(Developer)
  • September 10, 2008
  • Like
  • 0
 I am sending a mail from Trigger in which the content is in HTML format. i am able to convert the Text in HTML form.
I am having problem in adding Images in that mail. I need to add two images (one at the top & one at bottom) & text in between them. please let me know the best way to use images in html mail. should i use static resources if yes then how to use it .
or should i use documents if yes then how to use that.

i have tried two ways :---
-----           <img src="{!URLFOR($Resource.df08portal/images/template/bg_top.jpg)}"/>
-----           <img src="{!URLFOR($Resource.df08portal,  ' images/template/bg_top.jpg')}"/>

both are not working.
i did tried using <Image> Tag but even that not working..
  • September 05, 2008
  • Like
  • 0
I have developed two pages in visual force and passing one page values to next page which is rendered as PDF. The values from first page are not being displayed on the PDF but when I remove the <renderAs="pdf"> tag my values are correctly displayed in HTML form.
 
Can you please help me know why my values are not being displayed in PDF?
 
Thanks
  • July 18, 2008
  • Like
  • 0
hi,

I am facing a problem regarding picklist's selected value. I am not able to save the picklist's selected Value into a custom field
that is already created on an SObject. Please let me know any way or solution to get the ID or somthing so that i can save the picklist's selected value in my custom field.


regards,
Akash
  • June 26, 2008
  • Like
  • 0
hi,

I am facing a problem regarding picklist's selected value. I am not able to save the picklist's selected Value into a custom field
that is already created on an SObject. Please let me know any way or solution to get the ID or somthing so that i can save the picklist's selected value in my custom field.


regards,
Akash

  • June 26, 2008
  • Like
  • 0
hi

thanx for ur help but i got the answer.
I was using different objects in visualforce page in a single <Form> tag.thats why its not allowing me to do so
but now its working as i tried with different <Form> Tags.
 
regards
Akash
 


Message Edited by Akash on 06-04-2008 12:39 AM
  • April 25, 2008
  • Like
  • 0
Hi,

I am trying to attach an attachment in email for test method but I am not able to attach it. My code for email method is:

global Messaging.InboundEmailResult handleInboundEmail(Messaging.inboundEmail email,Messaging.InboundEnvelope env)
    {
        Messaging.InboundEmailResult result = new Messaging.InboundEmailResult();      
        string FileNames='';
        Integer RecCounter = 0 ;
        Integer ColCounter = 0 ;
                     
         List<Messaging.InboundEmail.TextAttachment> Obj =  new List<Messaging.InboundEmail.TextAttachment>();
         string UniquePhoneNumbers = '';
               
                                    
        if (email.textAttachments != null)
        {                                  
                //Attahcment found...
                Obj  = email.textAttachments;          
                Integer i;
}
}

and test method code is:

public static testMethod void testTasks() {

// Create a new email and envelope object
Messaging.InboundEmail email = new Messaging.InboundEmail();
Messaging.InboundEnvelope env = new Messaging.InboundEnvelope();


List<Messaging.InboundEmail.TextAttachment> objList =  new List<Messaging.InboundEmail.TextAttachment>();
Messaging.InboundEmail.TextAttachment obj = new Messaging.InboundEmail.TextAttachment();

obj.body = 'test';
obj.fileName = 'C:\test.vcf';
obj.mimeTypeSubType = 'application/octet-stream';

objList.add(obj);

email.textAttachments = objList;
}

The test method is not taking the attachment.

Can you please help me in attaching an attachment in my test method? Please treat this as very urgent.

Thanks
  • September 26, 2008
  • Like
  • 0
Hi

  I am facing a serious Issue with Trigger Bulk Data Manipulation. I need to insert & delete in bulk with the help of a trigger.
  but the problem is that trigger having limit to process 100 DML records. I have tried it using a class & then used the class method in trigger but no success. if anybody did bulk insertion,deletion of more than 100 records through trigger then plz help me out.
its urgent ...


regards,
Akash.....salesforce.com(Developer)
  • September 10, 2008
  • Like
  • 0
I have developed two pages in visual force and passing one page values to next page which is rendered as PDF. The values from first page are not being displayed on the PDF but when I remove the <renderAs="pdf"> tag my values are correctly displayed in HTML form.
 
Can you please help me know why my values are not being displayed in PDF?
 
Thanks
  • July 18, 2008
  • Like
  • 0