Question:
How can the user determine which Documents are currently utilizing the Object record to be deleted? When a user tries to delete an Object record, the user receives the following error message:
Answer:
There are two ways for a user to determine what documents, including which version(s) of each document, are currently utilizing the Object Record to be deleted. Once it is determined which documents and versions are referencing the Object Record, those references need to be removed to be able to delete the Object Record.
- Create and run an All Documents Type Report that has the option Include previous document versions enabled (checked).
- Add a Document Field Filter to the Report so that the Report only contains Documents that have the Object Type field equals the Object Record that the user is trying to delete.
Or,
- Run the following POST command using Vault API with the needed information populated in the {} sections.
https://{Vault_Domain}/api/v{Version_Number}/query?q=select name__v,version_id,{doc_field_name} FROM ALLVERSIONS documents where {doc_field_name}='{recordId}'
Related Documentation:
- Vault Reporting Documentation: Creating Reports
- Vault API Documentation: Retrieve All Documents