+ Start a Discussion
eggoni ashokeggoni ashok 

System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_EXECUTE_FLOW_TRIGGER, We can't save this record because the “demo2” process failed. Give your Salesforce admin these details.

//iam executed bluk record code.i getting this dml exception.//
public class ContactUtilty {
    Public static void CreateBulconRecords()
    {
        List<Contact> lstConRecords = new List<Contact>();
        
        for(integer counter = 1; counter <= 20; counter++)
        {
            // Prepare the Record..
            Contact con = new Contact();
            
                con.LastName= 'arjunreddy - '+ counter;
                con.Fax = '0878946464';
                con.HomePhone = '9900998877';
                con.Email = 'apexhr'+counter+'@gmail.com';
            
              // Add the Record to the Collection..
              lstconRecords.Add(con);
        }
        
        if(! lstconRecords.isEmpty())
        {
            insert lstconRecords;            
        }        
    }

}
ANUTEJANUTEJ (Salesforce Developers) 
Hi eggoni,

Have you checked the triggers on the object if there are any errors occurring while we are inserting records into the object?

Regards,
Anutej
Naval Sharma4Naval Sharma4
Hi eggoni, 

Looks like there is a process/flow on the Contact object which is getting failed. It's expecting a field with the value in one of the criteria/action added to the flow/process builder. Try to have a look at the Process Builders on Contact object.
Naval Sharma4Naval Sharma4
You should deactivate the "demo2" process builder and it should fix the issue.