1

All,

I am in deep trouble and trying to resolve the issue since last two weeks by my own but seems cannot resolve it.

I have my production up and running and all classes which we uploaded from sand box to production runs fine when I run it from developer console. However, if I try to upload any class from sandbox, there is one particular test class failing with strange error as below

TestOpportunityQQUpdate CreateOppQuote Internal Salesforce Error: 2124338966-175087 (-1070785217) (-1070785217) Stack Trace: null

Here is the code of class and test class

public class OpportunityQQUpdate {
    @future
    public static void OpportunityQuickQuote(Set < Id > oppIds) {
        list < Quote_Application__c > QQuoteVar;
        // List to store OpportunityTeamMember to create
        Opportunity lstOpp;
        // Iterate through the list of Opportunities that created from the Lead conversion
        for (Opportunity OppVar: [select Id, OwnerId from Opportunity where Id in: oppIds]) {
            QQuoteVar = [select OwnerId, Contacct_Agent__c, Email__c from Quote_Application__c where OpportunityQuickQuote__c =: OppVar.Id];
            lstOpp = [select OWNERID, Owner.Id, Owner.Name, Owner.Email from Opportunity where Id =: OppVar.Id];
            for (Quote_Application__c Q: QQuoteVar) {
                Q.Contacct_Agent__c = OppVar.OwnerId;
                Q.Email__c = lstOpp.Owner.Email;
                system.debug(lstOpp.Owner.Email);
                Update Q;
            }
        }
    }
}

Test Class

@isTest
public class TestOpportunityQQUpdate {
    static testMethod void CreateOppQuote() {
        /*Lead Ld = new Lead();
        Ld.FirstName = 'Anoop';
        Ld.LastName ='Jain';
        Ld.Status ='Open';
        Ld.Company='gNxt';
        Ld.USDOTNumber__c ='1234567';
        Ld.PAddressCity__c ='Las Vegas';
        Ld.PAddressState__c ='CA';
        Ld.PAddressStreet__c ='ABS';
        Ld.PAddressZip__c ='12345';
        Ld.BAddressState__c ='NV';
        Ld.BAddressCity__c = 'Las Vegas';
        Ld.BAddressStreet__c = 'SBDD';
        Ld.BAddressZip__c ='12345';
        Ld.Title ='12345';
        Ld.Phone ='123-234-1234';
        Insert LD; */
        Account Acct = new Account();
        Acct.Name = 'My Test Account';
        insert Acct;
        Opportunity Opp = new Opportunity();
        // Do you recognize these fields?
        Opp.Name = 'Test';
        Opp.Account = Acct;
        Opp.Amount = 0;
        Opp.CloseDate = System.today();
        Opp.StageName = 'Closed Won';

        insert Opp;
        Quote_Application__c QQ = new Quote_Application__c();
        //  QQ.Leads__c = LD.Id;

        QQ.OpportunityQuickQuote__c = Opp.Id;
        QQ.InsuredBusinessName__c = 'gNxt';
        QQ.No_Email__c = true;
        QQ.Mailingaddress__c = 'abdc';
        QQ.MailingCity__c = 'Las Vegas';
        QQ.Mailing_State__c = 'CA';
        QQ.MailingZip__c = '12345';
        QQ.PrincipleOwnerName__c = 'Anoop';
        QQ.Social_Security__c = '519-50-1234';
        QQ.EIN__c = '43-6433434';
        QQ.DOB__c = Date.today();
        QQ.BusinessStartedYear__c = Date.today();
        QQ.Drivers_License__c = '1222';
        //   setConvertedOppIds.add(Opp.Id);  

        QQ.Drivers_License_State__c = 'CA';
        QQ.InsuredPhoneNo__c = '123-234-1234';
        Insert QQ;
        id qqid = qq.ID;
        Commodities_transported__c CD = new Commodities_transported__c();
        CD.Avg_Value__c = 100;
        CD.Cargo_Info__c = 'AVG';
        CD.Freight_percent__c = 1;
        CD.Quote_Application__c = QQ.Id;
        Insert CD;

        Garage__c GR = new Garage__c();
        GR.City__c = 'New York';
        GR.State__c = 'CA';
        GR.Street__c = 'Test';
        GR.QuoteApplication__c = QQ.Id;
        GR.Zip__c = '12345';
        Insert GR;

        Driver__c DR = new Driver__c();
        DR.Accidents__c = '1';
        DR.CDL_Year__c = Date.Today();
        DR.DateOfHire__c = Date.Today();
        DR.Quote_Application__c = QQ.Id;
        DR.License__c = '12345';
        DR.Name_del__c = 'test1';
        DR.Type__c = 'Employee Driver';
        DR.Violations__c = '1';
        DR.DOB__c = Date.Today();
        DR.State__c = 'CA';
        Insert DR;

        Vehicle__c VR = new Vehicle__c();
        VR.CurrentValue__c = 100;
        VR.Deductable__c = '1000';
        VR.GVWR__c = 'Test';
        VR.Quote_Application__c = QQ.Id;
        VR.Make_Model__c = '12345';
        VR.Radius__c = '25';
        VR.Type__c = 'Tractor';
        VR.VIN__c = '1222222';
        VR.Year__c = '1989';

        Insert VR;

        Quote_Application__c QQAfter = new Quote_Application__c();

        QQAfter = [select CTCount__c from Quote_Application__c where id =: qqid];

        system.assertequals(QQAfter.CTCount__c, 1);

        /* Database.LeadConvert lc = new database.LeadConvert();
                lc.setLeadId(Ld.id);
                lc.setDoNotCreateOpportunity(false);
                lc.setConvertedStatus('Qualified');
                Database.LeadConvertResult lcr = Database.convertLead(lc);
            */

        /*  QQ.OpportunityQuickQuote__c =lcr.getOpportunityId();
          UPDATE QQ;*/
        Set < Id > setConvertedOppIds = new Set < Id > ();
        setConvertedOppIds.add(opp.Id);
        OpportunityQQUpdate.OpportunityQuickQuote(setConvertedOppIds);
    }
}
1

This seems a bug to me as Error Message includes stacktrace ID. I would request you to log a case with Salesforce and they will check whether the issue related to Summer'16 release or any bug.

| improve this answer | |
  • Thanks Shanu since we are not having premier support, we cannot log the case with Salesforce but I am very sure that this is the case – anoop jain May 11 '16 at 12:21
  • 1
    @anoopjain for stack trace ID you can log a case with basic support – C0DEPirate May 11 '16 at 12:29
  • Thanks and I worked with Salesforce support team yesterday and there solution worked like a charm. they have asked to do the below as it is a known issue Turn off "Enable User Control over Task Assignment Notifications" (Customize>> Activities>> Activities Settings) and try to deploy again. – anoop jain May 18 '16 at 7:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.