+ Start a Discussion

Internal Salesforce.com Error when inserting OpportunityLineItems - anybody know what this means

23:28:42.064 (1064722000)|DML_BEGIN|[169]|Op:Insert|Type:OpportunityLineItem|Rows:3

23:28:42.064 (1064744000)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:16

 23:28:42.070 (1070062000)|DML_END|[169]

23:28:42.071 (1071501000)|FATAL_ERROR|Internal Salesforce.com Error

23:28:42.760 (1071567000)|CUMULATIVE_LIMIT_USAGE


Number of SOQL queries: 48 out of 100  

Number of query rows: 550 out of 50000  

Number of SOSL queries: 0 out of 20  

Number of DML statements: 16 out of 150  

Number of DML rows: 50 out of 10000  

Number of script statements: 1519 out of 200000  

Maximum heap size: 0 out of 6000000  

Number of callouts: 0 out of 10  

Number of Email Invocations: 0 out of 10  

Number of fields describes: 0 out of 100  

 Number of record type describes: 0 out of 100  

Number of child relationships describes: 0 out of 100  

Number of picklist describes: 0 out of 100  

Number of future calls: 0 out of 10


Seems to happen with unit price is not set but the pricebookentry is set.   It kept complaining about TotalPrice and when I set that it complained that it need the pricebookentry.  When I set the pricebookentry is when I got this error.   Made no sense to set the total price so out of just trying things to see if I could get around the problem, I seem to have by setting the unitPrice from the pricebookentry.   I would have thought salesforce would do that given that it wanted the pricebookentry.


Still happens if I try to save more than 1 OpportunityLineItem at a time ...


Is OpportunityLineItem not bulkified?


I have tried just doing an insert rather than adding them to a list and then inserting


but I get the error even if I use to inserts.