• Vivek Kumar - IBM
  • NEWBIE
  • 0 Points
  • Member since 2011

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

Our company is using custom object for storing products. Now we want to copy all the data from that Custom Object to the standard product object. I'm wondering which is the best way to copy data? We are having about a quarter million products in our Custom Object and it's growing day by day. If anyone could provide a better solution that would be really helpful. I'm a beginner SF developer and not yet introduced to the complex side of Apex Programming. 

 

 

Many Thanks,

Jodil

  • August 18, 2011
  • Like
  • 0

Hi all,

 

I am getting an error while writing test class on merging trigger 

 

System.NullPointerException: Attempt to de-reference a null object

 

This is the error am getting please give me the solution as soon as possible.

 

Below is the code which i have written.....

 

@isTest
private class MQL
{
    static testMethod void myUnitTest()
    {
          Date t = date.today();
          Date d = Date.newInstance(t.year(),t.month(),t.day());
   
        //  Query the StageName
       
        Opportunity opp = [Select StageName, MQL_Promotion_Date__c, MQL_Rejection_Date__c from Opportunity WHERE Name = 'MQL'];
       
        System.Debug(' Val '+opp.StageName);
        System.Debug('Opp MQl Date Val '+string.valueof(opp.MQL_Promotion_Date__c));
      
        if(opp.StageName=='Lead' || opp.StageName=='Qualified Lead')
        {
            opp.StageName = 'D - Qualify';
            update opp;
           
            if(opp.StageName != 'Lead' && opp.StageName != 'Qualified Lead' && opp.StageName != 'No Opportunity')
            {        
                //System.assertEquals(opp.MQL_Promotion_Date__c,d);         
                System.debug('*** Oppty changed from Lead to something other than Lead or No Opportunity - date set to ' + System.today()+' ****');
      //  date MQLd=opp.MQL_Promotion_Date__c;
      //  MQLd=date.today();
          //  boolean dueNow = d.isSameDa(opp.MQL_Promotion_Date__c);
            system.debug(opp.MQL_Promotion_Date__c.isSameDay(d));
            }
            if(opp.StageName == 'No Opportunity')
            {
                //System.assertEquals(opp.MQL_Promotion_Date__c,d); 
                System.debug('*** Oppty changed from Lead to No Opportunity-date set to'+System.today() +'****');
                system.debug(opp.MQL_Rejection_Date__c.isSameDay(d));
            }
       }
    }
}



Thanks in advance.....

shruthika...