You need to sign in to do that
Don't have an account?

System.DmlException:ENTITY_IS_DELETED, entity is deleted: []
Hi,
While i am inserting the data in custom object through Visual force page, i am facing below error.
System.DmlException: Insert failed. First exception on row 0; first error: ENTITY_IS_DELETED, entity is deleted: []
Please help me out to resolve the above issue
Thanks,
Md SaleemBaba.
Can you please paste your code.
Thanks
Anu
This error happens every so often with no apparent root cause (on the insert line):
Insert failed. First exception on row 0; first error: ENTITY_IS_DELETED, entity is deleted: []
Class.CF_SF_Quote_Maintain.ISIS_Quote_Maintain: line 303, column 1
CRM_Quote__c qc = newCRM_Quote__c();
qc.CC_Value__c=param1.CC_Value;
qc.CRM_Quote__c=param1.CRM_Quote;
qc.Classification__c=param1.Classification;
integer countguid =[
Selectcount() fromCRM_Quote__cwhere QUOTE_GUID__c=:param1.QUOTE_GUID];
integer countopp =[
Selectcount() fromCRM_Quote__cwhere QUOTE_GUID__c=:param1.QUOTE_GUID and Opportunity__c =:oppid];
integer countoppponly =[
Selectcount() fromCRM_Quote__cwhere Forecast_relevant__c = trueand Opportunity__c =:oppid];
//**When Same OppID and GUID Update
if (countguid > 0 && countopp > 0){
upsert qc QUOTE_GUID__c;
}
//**When No Match Insert
if (countguid ==0 && countopp==0){
insert qc ;
}