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
MaumanMauman 

Deleting Questions

Hi!  I'm new to SalesForce so pardon me if this is redundant.

1. From the documentation it is my understanding that deleting an object through the Salesforce API "is analogous to the DELETE statement in SQL", but in truth it appears that it moves the object to the "Recycling Bin".  Correct?

2. Also  "the delete call supports cascading deletions", so if I delete an Account, then all of the Contacts under that Account will be deleted also, correct? 

Just as a side note, if #2 is correct, then should I be able to delete a Contact, then delete its Account, and then undelete the Contact through the browser interface?  Wouldn't the contact be deleted when the bin is emptied?  Perhaps child objects shouldn't appear on the Recycling Bin page, if the parent object is in there (I know... easier said than done).

 

DevAngelDevAngel

Hi Mauman,

For question #1 - The delete does place objects into the recycle bin.  Recycle bin access or undelete is not supported in this release.

For question #2 - The delete from the API runs the same code as the delete through the UI.  So, if the delete cascades in the UI you had better assume it will in the API as well.

For the note - Perhaps.