Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.

For information on migrating to InterSystems IRIS, see How to Migrate to InterSystems IRIS, available on the WRC Distributions page (login required).


The DeleteContact method removes from the database the Contact instance currently displayed on the Edit Contact Information panel. The event handler for the Delete button invokes DeleteContact. Here are some more details about what DeleteContact does:

  1. Verifies that curContact has a non-null reference and that any Contact object that it points to is connected to Caché.

  2. If the conditions from 1 hold, it deletes curContact using DeleteId.

  3. Invokes ClearContact to remove the now out of date information from the Edit Contact Information panel.

  4. Invokes RefreshContacts to update the tree to display the new list of contacts.

Here is the method. Add the body of the method to the DeleteContact stub in PhoneFormObj.cs.

private void DeleteContact
 if ((curContact != null) && (curContact.IsConnected))
   Contact.DeleteId(cnCache, curContact.Id());