Symptoms
Error message appears when trying to open document definition.
Referenced file not found: '<Dataset Name>' Cause
The error indicates that one of Document Definition data sets is corrupted so Document Definition is considered corrupted and cannot be opened.
The problem usually appears because of the inconsistency between data set version in FlexiCapture Database records and in the project on server (e.g. project files in File Storage). Most common origin of such discrepancy is network interruptions or other kind of influence to the process of document definition update (during editing, saving, and publishing).
Resolution
The corrupted data set can be restored via the Database.
Before any database manipulation, the backup should be created!
- As the first step, identify the correct project ID in [dbo].[Project].
- Then using the project ID filter the [dbo].[ProjectDBCache] to find out the template ID and versions.
-
Check in the file storage what is the latest version of the template. Confirm that it is missing the dataset from the error. The path to file storage may look like this:
C:\FileStorage\<DatabaseGUID>\project_<ProjectId>\DatabaseCaches\_TemplateCaches\Template_<TemplateId>\Version_<VersionId>
- If the latest available template version does not contain the required dataset, but in the database you see that there is link to it, it means the current template version is corrupted and you need to roll back to the previous version that contains all the caches in the file storage.
- With the next step modify [dbo].[TemplateVersion]. Filter the table with the "TemplateId" that was found in the previous step.
- Find the latest version for the Document Definition (Name column) and delete this record.
As the last step try to open the document definition, update the data sets, and publish it to get a new ID.