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
Mel LisauMel Lisau 

Help with Empty Recycle Bin , objects remain ?

I have custom objects , say     My_Account__c, My_Contact__c , My_Address_c and others. 
I can successfully delete all custom objects , and then I go to run the empty recycle bin by using :

 public void EmptyRecycleBin(String[] ids)
        {
                EmptyRecycleBinResult[] result = _myservice.emptyRecycleBin(ids);
                for (int i = 0; i < result.Length; i++)
                {
                    EmptyRecycleBinResult result = emptyRecycleBinResults[i];
                }           
        }

I get a EmptyRecycleBinResult result of success, but when i go to the Create-Objects, I can see my custom object is deleted , but it remains in the Deleted Objects. I thought the EmptyRecyceBin would purge the objects in there , 
How can i permanently delete these custom objects ? 
VinayVinay (Salesforce Developers) 
Hi Mel,

I don't think you can delete object from deleted objects.  Tried to check but haven't found anything related.

Thanks,
Mel LisauMel Lisau
Can i use the destructivechanges.xml and pakage.xml , will that purge deleted objects . So if i delete the object using destructivechanges.xml and set purge on delete will that just delete the object and not put it in the deleted objects ? If so , can i do this in c# calls ?
Mel LisauMel Lisau
It seems that there is still a link / relationship when i try to programtically re-create this custom object.  So when i delete the custom object using the following code , 

DeleteResult[] results = metadataConnection.deleteMetadata( "CustomObject", new String[] { "MyCustomObject1__c", "MyCustomObject2__c" });

It goes to the recycle bin, if i try to re-create kit says there is a duplicate field. So do i need to delete all fields and relationships ? If so , how can i do that, as there may be alot of fields and links on a particular custom object ?