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
dai tran 6dai tran 6 

Why can't delete custom object?

It display error:
Your attempt to delete MyCart could not be completed because it is associated with the following relationships with other objects.

Object Type Relationship
MyProduct MyCart
MyProduct MyCart

I had deleted Lookup relationships  in table MyProduct , but still can't delete MyCart.
Best Answer chosen by dai tran 6
Ajay K DubediAjay K Dubedi
Hi Dai,

Please refer below. Hope it helps you.

You have to remove the object dependency from all the classes, triggers and in records wherever you have used in org.

Try going into the object where you deleted the lookup field, and you will see "Deleted Feilds". Click that to then fully ERASE the field.  You should be able to delete the previously related objects.

Please select as best answer if it helps.

Thank You,
Ajay Dubedi

All Answers

Ajay K DubediAjay K Dubedi
Hi Dai,

Please refer below. Hope it helps you.

You have to remove the object dependency from all the classes, triggers and in records wherever you have used in org.

Try going into the object where you deleted the lookup field, and you will see "Deleted Feilds". Click that to then fully ERASE the field.  You should be able to delete the previously related objects.

Please select as best answer if it helps.

Thank You,
Ajay Dubedi
This was selected as the best answer
dai tran 6dai tran 6
I not see  "Deleted Feilds".
dai tran 6dai tran 6
ok , thank you, i had delete ok.
i have to switch to salesforce class to remove in "Deleted Feilds"..
Ajay K DubediAjay K Dubedi
Hi Dai,

If the above solution solves your problem then mark this answer as best answer.
So that other may facing this issue will get help from this.

Thank You,
Ajay Dubedi