function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SaleemBaba MohammedSaleemBaba Mohammed 

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.

Anu Raj.ax1269Anu Raj.ax1269

Can you please paste your code. 

Thanks 

Anu

kbrewerkbrewer

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 ;

         }