Hard deleting custom object records


Administrators can hard delete custom object records so that the custom object can be removed from your Network instance. The hard deletion process involves soft-deleting the records (record state is DELETED) and then flagging the records for hard deletion. Veeva Support will hard delete the records, and then administrators can delete the custom object in the data model.

This feature is enabled by default if you have custom objects enabled in your Network instance.

About hard deleted records

Hard deleting records is helpful when you have loaded data for testing but you no longer want the object and records in your Network instance.

When custom object records are hard deleted:

  • They are permanently removed from your Network instance.

  • Pending and closed add and change requests are deleted.

  • Pending and closed suspect match tasks are deleted if they contain deleted records.

  • Source subscription jobs for the deleted records are still available for audit purposes.

  • Reports cannot be run on the records. Reports that previously ran using the deleted records are available to view.

Soft deleted records

In comparison, when records are soft-deleted using the Delete Custom Object Records data maintenance job, the record state is set to DELETED and the records can no longer be viewed, but they still exist in your database. The custom main object cannot be deleted because the records still exist. Hard deleting the records (and tasks) completely removes the records from your database so the custom object can also be deleted.

Deletion process

The deletion process for custom object records requires assistance from Veeva Support.

Administrators must complete the following tasks:

  • Run the Delete Custom Object Records data maintenance job to soft delete the records. The records will be updated to the DELETED record state.

    Note: If records were marked INVALID or DELETED using other subscriptions, they will need to be soft-deleted by this data maintenance subscription again. Only this data maintenance job properly updates the record state for the hard deletion process.

  • Flag the records to be hard deleted.

  • Submit a ticket to Veeva Support to hard-delete the records.

Veeva Network automatically exports the flagged records to your FTP folder (outbound/hard_delete_backup) before they are hard deleted. After the deletion is complete, the action cannot be reversed; the records and data are permanently removed.

When the records have been deleted, administrators can delete the custom object definition in the data model.

Run the data maintenance job

To soft delete the custom object records, run the Delete Custom Object Records job. Records for one main custom object can be deleted for each job.

When you use the data maintenance job, you have two options:

  • Delete all records for the object.

  • Delete specific records by identifying them by Veeva ID in a .csv file.

    If you delete records using a file, remember to include any unverified records that are invalid. When unverified records are rejected by data stewards, the record state is updated to Invalid. These also need to be updated to DELETED.

For details about creating and running the data maintenance job, see Deleting custom object records.

Reviewing the soft delete job details

After the data maintenance jobs runs, you can click the Job ID in the Job History section to review the details.

Flag records for deletion

When records for main custom objects are deleted, records for custom sub-objects and relationship objects might also be deleted. The impacted objects are identified before you flag the custom object records.

To flag records:

  1. In the Admin console, click Data Model and choose the data domain that contains the custom object.

  2. On the custom domain page, select the custom object.

  3. Click the Delete Records link on the summary header to go to that section. Review any sub-object or relationship objects that will also have records deleted.

  4. Select Flag soft-deleted records for hard-deletion.

    Note that the Delete Object button is dimmed. You cannot delete the custom object until the records are hard deleted.

  5. In the confirmation dialog, click Flag Record Deletion.

  6. Save your changes.

Note: If the records were flagged in error, you can clear the Flag soft-deleted records for hard-deletion checkbox any time before Veeva Support begins the hard deletion. Only the records that are flagged at the time of hard deletion will be included in the job.

Tip: If you want to delete the custom object after the records are hard deleted, ensure that new records are not loaded for the object through your subscriptions.

Create a Veeva Support ticket

After the records have been flagged, create a ticket for Veeva Support. Veeva Support will contact you to plan a time for a maintenance window to complete the job. The flagged records will be exported to your FTP folder (outbound/hard_delete_backup) before they are hard deleted.

Hard deleting records

Only records that were soft-deleted by the Delete Custom Object Records data maintenance job will be hard-deleted by Veeva Support. Records that were updated to DELETED record state using a source subscription will not be included in the hard deletion job.

When Veeva Support has completed the job, the records and any tasks for the records are permanently removed.

To review the job details:

  • On the Data Maintenance Subscriptions page, click the hard_delete_custom__v subscription name in the list. This subscription is generated by Veeva Network.

The Custom Object Deletion Summary page lists the hard delete jobs for your Network instance. Each job displays the job ID, Zendesk #, objects that were deleted, the time the job started and the outcome.

Click the job ID to review the job details.

This page displays the status of the job, records that were deleted, and the Veeva Support (Zendesk) ticket that was assigned to the job. The Hard Delete Records Export FTP section contains the path to your backed-up records. The filename is unique for each hard delete job; it contains the job ID and objects that were deleted.

Delete the custom object

After Veeva Support has hard deleted the records, you can delete the custom object from the data model. Veeva Support does not delete the custom object when they delete the records. This gives you the option to load new records or to delete the custom object yourself.

On the custom object data model page, the Delete Object button is no longer dimmed because the records and tasks have been hard deleted and removed from the database.

Logs

The soft delete and hard delete jobs are tracked in the System Audit History (Logs).