DeleteRecord

Marks a record for deletion.

The delete operation does not apply to the children of the record. As a result, the deletion of a record may leave some orphaned child records. To identify orphaned records, run the following SQL statement using either the CRMQuery object or CRMRecord object:

select bord_name, bord_companyupdatefieldname from custom_tables where bord_companyupdatefieldname is not null

Values

This property can take one of the following values:

  • true. Marks the record for deletion. The deletion occurs when the SaveChanges() method is called.
  • false. Specifies that the record will not be deleted when the SaveChanges() method is called.
Examples
Copy
var Comp;
Comp = CRM.FindRecord('company', "comp_name = 'Eurolandia'");
Comp.DeleteRecord = true;
Comp.SaveChanges();

Deletes a record representing the Eurolandia company in the company table.