Each time a document is generated, a corresponding temporary file is created and stored within Dataverse. Since these temporary files can add up and consume large amounts of database storage, it becomes important to delete them from time to time.
This article provides instructions on how to
- Find the correct temporary data files and
- Create a workflow that purges the files automatically
Note: Alternatively, if you’d like to store your temporary files outside of Dataverse, please see here.
1a. Finding the correct temporary files via filtered view
To locate the correct temporary files, navigate to Power Apps and locate the MSCRM-ADDONS.com User/Temp Settings table. Then, click on Views.
Create a new view on the next page.
Name your view and select edit filters.
Add the following filters to the Edit filters window:
- Name Begins with AM_Doc
- Name Begins with DCP API Concat
- Name Equals DCPConcatenatedDocument
- Name Equals SharePoint Doc converted
- Name Equals SharePoint Template
- Name Equals DCPSaveToSharePoint
- Name Equals DCP API AttachToEmail
- Value Begins With print:?id=
- Value Begins With fetch:<fetch
- Value Begins With <DSSetting
Save and publish this view. This view can be accessed by navigating to the ❶ Power Platformer Environment Settings and clicking on the ❷ DocumentsCorePack tab. Under the ❸ Entities tab, open the ❹ MSCRM-ADDONS.com User/Temp Settings entity link.
Note: To see the Entities tab, please make sure your DocumentsCorePack Server version is updated to 2024.3 or higher
After selecting our created view, the filtered list will be displayed.
1b. Finding the correct temporary files via Advanced Find (legacy)
To find the correct temporary files via Advanced Find, enter the following URL into your web browser, replacing “<YOURCRMNAMEHERE>” with the name of your Dataverse instance:
https://<YOURCRMNAMEHERE>.crm4.dynamics.com/main.aspx?pagetype=advancedfind
Under the Look For drop down, select MSCRM-ADDONS.com User/Temp Settings and enter the following filters:
- Name Begins with AM_Doc
- Name Begins with DCP API Concat
- Name Equals DCPConcatenatedDocument
- Name Equals SharePoint Doc converted
- Name Equals SharePoint Template
- Name Equals DCPSaveToSharePoint
- Name Equals DCP API AttachToEmail
- Value Begins With print:?id=
- Value Begins With fetch:<fetch
- Value Begins With <DSSetting
By clicking the Result button, a list of temporary files will be displayed.
2. Creating an automatic workflow to delete temporary files
To manage large quantities of temporary files, it is useful to configure an automated solution to delete them. By creating a workflow, we can schedule our temporary files to be deleted on a regular basis.
To create a workflow, navigate to the Power Platform Environment Settings. Select the Data Management tab and click on Bulk record deletion.
Then, create a new bulk record deletion job.
When defining the search criteria, select either the view created as described in 1a, or recreate the search as outlined in 1b.
Click next. On the following screen, you can define when the bulk deletion job should run.
You can submit your workflow on the final step. Once submitted, this will enable the workflow.
Additional: Deleting debug records or AutoMergeWorkingItems
Old DocumentsCorePack debug records and AutoMergeWorkingItems can take up storage space as well. They can be similarly deleted using bulk deletion.
To delete debug records, select MSCRM-ADDONS.com Debug in the dropdown and set it delete any inactive debug records.
To delete AutoMergeWorkingItems, select MSCRM-ADDONS.com AutoMergeWorkingItems in the dropdown and set it to delete inactive records older than seven days.
Once both workflows have been configured, set a schedule and submit them.
That’s it! We appreciate your feedback! Please share your thoughts by sending an email to office@mscrm-addons.com.