• Saania Khan
  • NEWBIE
  • 10 Points
  • Member since 2016

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

I am getting the following Error, when the system is trying to edit a Quote record.
 
An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact Salesforce Support. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience. 

Thank you again for your patience and assistance. And thanks for using salesforce.com!
Error ID: 1465203506-586599 (1714459975)

A little background on the flow of Quotes.
1. All Quotes with Status = 'Approved' are locked.
2. The user trying to edit the Quote has System Admin Permissions. The process has worked fine in the past, but we have been getting this error over the past couple of weeks.
3. Error does not show up for all other Statuses, even when they are under the same Record Type.


Thanks,
Saania
Hi,

I am using the following snippet in a Test Class. When I copy it in Developer Console, it works just fine ! But in the test class, the size of pbe list is zero !
List<PriceBookEntry> pbe = new List<PriceBookEntry>( );
    pbe = [Select Id,Name,PriceBook2ID, Product2Id from PriceBookEntry where ProductCode = 'NRG-HF-89-C0' and CURRENCYISOCODE='USD'];

System.Debug(pbe.size());
Opportunity o= new Opportunity(Name = 'Test Opportunity', StageName = 'Drop In', CloseDate = system.today() + 30);
        insert o;
        Quote q= new Quote(Name = 'Test Quote', Status = 'Draft', OpportunityId = o.Id, Pricebook2Id=pbe[0].PriceBook2Id);
        insert q;
        QuoteLineItem qli= new QuoteLineItem (Quantity=1, QuoteId=q.Id,UnitPrice=100.00, Discount = 50, PriceBookEntryId = pbe[0].Id, Product2Id=pbe[0].Product2Id);
        
        insert qli;
        System.assertNotEquals(null,q); 
        
          
        // Retrieve the create quote line item
        qli = [SELECT Id,TotalPrice,Discount,Discount_Amount__c FROM QuoteLineItem WHERE Id =:qli.Id];  
    
        System.assertEquals(50,qli.Discount_Amount__c);
        
        qli.Discount = 25;
        
        update qli;
        
        // Retrieve the create quote line item
        qli = [SELECT Id,TotalPrice,Discount,Discount_Amount__c FROM QuoteLineItem WHERE Id =:qli.Id];  
    
        System.assertEquals(25,qli.Discount_Amount__c);

delete o;

Thanks !
Hi,

I am using the following snippet in a Test Class. When I copy it in Developer Console, it works just fine ! But in the test class, the size of pbe list is zero !
List<PriceBookEntry> pbe = new List<PriceBookEntry>( );
    pbe = [Select Id,Name,PriceBook2ID, Product2Id from PriceBookEntry where ProductCode = 'NRG-HF-89-C0' and CURRENCYISOCODE='USD'];

System.Debug(pbe.size());
Opportunity o= new Opportunity(Name = 'Test Opportunity', StageName = 'Drop In', CloseDate = system.today() + 30);
        insert o;
        Quote q= new Quote(Name = 'Test Quote', Status = 'Draft', OpportunityId = o.Id, Pricebook2Id=pbe[0].PriceBook2Id);
        insert q;
        QuoteLineItem qli= new QuoteLineItem (Quantity=1, QuoteId=q.Id,UnitPrice=100.00, Discount = 50, PriceBookEntryId = pbe[0].Id, Product2Id=pbe[0].Product2Id);
        
        insert qli;
        System.assertNotEquals(null,q); 
        
          
        // Retrieve the create quote line item
        qli = [SELECT Id,TotalPrice,Discount,Discount_Amount__c FROM QuoteLineItem WHERE Id =:qli.Id];  
    
        System.assertEquals(50,qli.Discount_Amount__c);
        
        qli.Discount = 25;
        
        update qli;
        
        // Retrieve the create quote line item
        qli = [SELECT Id,TotalPrice,Discount,Discount_Amount__c FROM QuoteLineItem WHERE Id =:qli.Id];  
    
        System.assertEquals(25,qli.Discount_Amount__c);

delete o;

Thanks !