+ Start a Discussion
Arpit Jain92Arpit Jain92 

Object Deletion

Hi All,

Why a custom is not deleted that was in relationship?

Regards,
Arpit
Best Answer chosen by Arpit Jain92
MOHAN KRISHNA MOLAGAMUDIMOHAN KRISHNA MOLAGAMUDI
Hi Arpit,

          Have you deleted all the fields? if you deleted! then select that object which you want to delete and under  Custom Fields & Relationships you will find deleted fields. Just select that deleted fields and there it shows erase and undelete -> click erase to all the fields and then try to delete that object. hope it'll work. 

because if you deleted the fields it won't delete permanently for that you need to erase.

Regards
Mohan

All Answers

Vishal Negandhi 16Vishal Negandhi 16
Can you be more precise here?
Did you try and delete an Object and then expecting the related object to get deleted too?
 
Arpit Jain92Arpit Jain92
Hi Vishal,
First I created a Master-Detail relationship b/w two objects then I remove this relationship and try to delete detail object but I can't.
Arunkumar RArunkumar R
Hi Aript,

So you created a junction object, that connects two objects.(m/d). 

Did you changed the relationship from m/d to lookup?

What error you are getting when deleting object?
Arpit Jain92Arpit Jain92
HI Arun,

No, I created only m/d and lookup not junction. Even I deleted all the fields of both objects still the problem is same.
Vishal Negandhi 16Vishal Negandhi 16
So Arpit, are you being blocked when you try do delete the child object?

I am confused, are you deleting objects or records?
MOHAN KRISHNA MOLAGAMUDIMOHAN KRISHNA MOLAGAMUDI
Hi Arpit,
    
           you created a master - Detail relationship b/n two objects and you wanted to delete detail object! is it right?
            or
           you wanted to delete master object?
           or
            you want to delete the relationship and not to delete the objects (master and detail)?

1. If your question is related to first option then you cannot delete the detail object when it is in m/d relation. you need to change the m/d relation to lookup relation by editing the master object relationship field and change the datatype into lookup from m/d, then you can directly delete that detail object.
------------------------------------------------------
2. If you want to delete master object then, you can directly delete that master object even if it is in m/d relationship but the detail object is also deleted automatically. if you don't want to delete detail object then you need to change that relation to lookup and delete, then it won't effect to detail object.
-----------------------------------------------------------
3. If your question is related to the 3rd option then, you need to change the relation to lookup and then delete the lookup relation for that object.

is it helpful or need any assistance!
just ping for any query!

Regards
Mohan Krishna
 
Arpit Jain92Arpit Jain92
Hi Vishal,

I am trying to delete object..Actually Initially I created objects and then create a lookup and M/d relationship on different objects then I removed the relationship and deleted all the fields or try to delete child object..but I can't. 
Arpit Jain92Arpit Jain92
Hi Mohan,

Initially I created objects and then create a lookup and M/d relationship on different objects then I removed the relationship and deleted all the fields or try to delete child object..but I can't or if I tried to delete master object then it will. 
AshlekhAshlekh
Hi,

Simple ans is if you have any dependenciy on any to each other or deleted object are reference anywhere than you cann't delete it.

-Thanks
Ashlekh Gera
Arpit Jain92Arpit Jain92
Hi Ashelkh,

I have deleted all the fields still getting the issue.

Thanks
Arpit
MOHAN KRISHNA MOLAGAMUDIMOHAN KRISHNA MOLAGAMUDI
Hi Arpit,

          Have you deleted all the fields? if you deleted! then select that object which you want to delete and under  Custom Fields & Relationships you will find deleted fields. Just select that deleted fields and there it shows erase and undelete -> click erase to all the fields and then try to delete that object. hope it'll work. 

because if you deleted the fields it won't delete permanently for that you need to erase.

Regards
Mohan
This was selected as the best answer
Arpit Jain92Arpit Jain92
Hi Mohan,

This is working..:) But why this happen, why we need to erase this.
Thank you.
MOHAN KRISHNA MOLAGAMUDIMOHAN KRISHNA MOLAGAMUDI
HI Arpit,

           Because, if any one by accediently deleted some objects or fields then they need to create once again. for that reason salesforce given this. by having this option he can retrive and check which objects or fields he deleted, its like a recycle bin.

Regards
Mohan
Arpit Jain92Arpit Jain92
That is good..but when I tried to delete the object witout erasing the field, pbject is not deleted..Why??