/* */
One built-in Boolean property of objects that can be set using a button is the “delete pending flag”. Creating a button based on this property is the recommended way to allow certain web site users to manually delete objects from the system. The “delete pending flag” follows the correct sequence of actions by first disassociating any tag from the object, then deleting the object from the data model, so it avoids any race condition where the object could receive a location after it has been removed. If additional clean up actions are required before deleting the object, then another Boolean property should be used along with business rules/integration code to do the clean-up and then set the delete pending flag to finally remove the object.
See also: Manually deleting objects