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
Doug ShattoDoug Shatto 

System.dmlexception: Delete failed

Getting the following error and cannot complete Trailhead challenge.

Challenge Not yet complete... here's what's wrong:
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Delete failed. First exception on row 0 with id 00141000013JMSvAAO; first error: DELETE_FAILED, Your attempt to delete TestMyCodeCo could not be completed because it is associated with the following cases.: 00001055 : []
Abdul KhatriAbdul Khatri
Seems like you first need to delete the case associated with TestMyCodeCo before you delete itself.
Abdul KhatriAbdul Khatri
Hey was my suggestion helpful?
RazaRaza
Hi Doug Shatto ,
your DmlException problem resolve.
Your programe normally execute and case associated recordes not delete but normal records are delete


List<sObject> obj=[Select Id from sObject];
Database.delete(obj, false);

 
Abdul KhatriAbdul Khatri
Hey Doug Shatto

Was suggestion helpful? Please mark best if it was. Thanks.