Keep D365FO Print Archive Small to Pay Less

With Microsoft’s latest license enforcement changes, storage costs in Dynamics 365 Finance & Operations (D365FO) are becoming increasingly relevant. Every gigabyte counts, and if you don’t actively monitor storage, it can silently inflate your bill.

Luckily, D365FO comes with several standard cleanup jobs to keep things in check, for example, clearing the batch job history or data management job logs.

Why a Print archive cleanup job?

Saving a report to the Print archive is one of the options of Docentric AX’s print destinations. It’s a handy feature because it creates a retrievable copy of the report that you can view or download later.

Docentric AX has an improved version of the Print archive that’s available as part of the Free Edition. Click here to learn more >>

But here’s the catch: over time, the Print archive can grow significantly, and that growth translates directly into higher storage consumption in your tenant.

Unlike transactional data, old reports rarely need to be retained indefinitely. Configuring a scheduled Print archive cleanup job ensures only relevant and recent reports remain, reducing your storage footprint and lowering costs.

Archiving report documents with Docentric is done using a configurable Document type for archiving. Click here to learn more >>

SharePoint as an alternative

When saving reports to Print archive, archived report records with report-specific metadata (e.g., Account number and Invoice ID) are stored in the Print archive table, while the corresponding archived report documents are saved to the location specified by the Document type used for archiving - this can be either a SharePoint library or internal Azure Blob storage.

If you need to keep report documents for the long term, consider archiving them to a SharePoint library with metadata instead of internal Azure Blob storage. This can be achieved by configuring a Document type for archiving that points to a SharePoint library where Saving to SharePoint with metadata is enabled - both for the library and for the archiving report type. Learn more >>

SharePoint offers:

  • More flexible document management.
  • Better search capabilities.
  • Lower storage costs.

This way, you can store important reports safely in SharePoint for long-term access while also keeping Print archive light.

Configure a Document type

To enable SharePoint as a location for storing the archived documents, go to Organization administration > Document management > Document types and create a new type:

  1. Location: select SharePoint.
  2. SharePoint Address: click the edit button and select the site and folder where you want to store the documents.
  3. Document removal options: here you have two fields that enable an interesting behavior for what you wish to achieve.

    1. Remove: choose between Document and physical type that deletes the file from SharePoint and the document in D365FO, or Document only, which only removes the reference to SharePoint in D365FO.
    2. Ask for confirmation: enable it to ask the user for confirmation of the deletion.

Thanks to the Remove option, you can clean the Print archive records while keeping the printed documents on SharePoint.

And now, how do you actually see what’s consuming storage? That’s where PPAC comes in.

Check your storage in PPAC

You can check your top consuming tables in the Power Platform admin center (PPAC):

Go to the Licensing menu, click Capacity add-ons, and then select the Finance and operations tab.

Here you have two columns:

  • Finance and operations database usage: it shows the D365FO DB size. If you click it, a side pane will open, displaying a list of the tables ordered by size.
  • Finance and operations file usage: it shows the overall file storage consumption. There are no details even if you click it.

The database usage pane displays the table list and lets you export a CSV file with the contents:

It’s important to keep an eye on this periodically to avoid surprises!

Running the Print archive cleanup job

To run the Print archive cleanup job, go to Organization administration > Inquiries and reports > Print archive. You will see the Print archive cleanup button in the action pane.

To see the menu item and open the dialog, you must either have the System administrator role or be assigned the Maintain Print archive for all users duty (DocPrintArchiveAllMaintain).

How it works

Clicking the menu item will open a dialog with a pre-built query filter. If prior to clicking the menu item you applied any filter to the form's grid columns, the filter condition will be already applied to the query. For example, if we filter on account number DE-001:

The Account number field in the query is automatically populated. If you don’t add any filters, you can build the query manually or leave it empty and clear all records.

Once the process finishes, a message appears showing how many records were deleted.

You can run the process:

  • Synchronously: if you’re deleting only some records.
  • In batch: if you want to schedule it regularly or handle large datasets.
If the resulting query has over 10,000 rows, a warning will be shown before starting the process or scheduling the batch to avoid performance issues.

Customize using a delegate

Developers can use the DocPrintArchiveCleanupService.processDeletingRecord delegate to take action before records and their archived report documents are deleted.

By subscribing to this delegate, you can log details about the deleted items or even move the report documents to another storage location instead of permanently removing them.

We’ve written an in-depth article about delegates and event handlers in D365FO. Check it out >>

Conclusion

Managing storage in D365FO isn’t just about performance; it's about controlling costs.

While standard cleanup jobs handle logs and histories, the Print archive is an often-neglected storage hog.

By setting up a Print archive cleanup job and using SharePoint for long-term report storage, you can:

  • Reduce database usage.
  • Lower licensing costs.
  • Keep your environment efficient.
Docentric improves Print archive with searchable report metadata, instant document preview, the ability to download archived reports directly from common journals, access to archived outgoing documents from customer and vendor cards, and more. Explore the articles >>

See also the how-to manuals related to Print archive >>

The Print archive cleanup job is available in the Docentric AX Free Edition. Try it today — it takes minutes to set up and can instantly reduce your database size and license costs.

Related

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Docentric respects your privacy. Learn how your comment data is processed >>

Docentric respects your privacy. Learn how your comment data is processed >>