D365 Finance supports embedding binary files as AOT resources inside a model. Docentric Report templates can also be stored as AOT resources trough Visual Studio so they deploy with your model, with no manual file management needed per environment. Once added to your project, you register the resource in Report setup and select it as the template’s storage location.
Approach
Add the .docx file as an AOT resource inside your Visual Studio project, then simply point the report’s template in Docentric Report setup to that resource.
Steps:
-
In Visual Studio, open your D365 Finance project.
-
Right-click the project and choose Add > New Item, then select Resource.
-
Give the resource a meaningful name (no spaces in the filename) and browse to your .docx template file to add it. The resource now appears under Resources in Solution Explorer and will be deployed as part of your model’s deployable package.
-
Open the relevant Report setup form in D365 Finance.
-
Go to the Templates FastTab and add a new template record.
-
Set the Template storage (Current storage type) field to AOT Resource.
-
In the Resource name field, select the resource you just created from the dropdown list.
Verification:
The template record in Report setup shows the Current storage type as AOT Resource and a Filename. Previewing or printing the report confirms the template loads correctly from the AOT resource.
Notes / Limitations
The template .docx file must have its DDSP file loaded before you add it as an AOT resource. Docentric checks for the embedded DDSP at runtime, and a template without one will not be recognized correctly. If you update the template later, you must replace the AOT resource in Visual Studio, rebuild, and redeploy the package - unlike Azure Blob or database storage, AOT resources cannot be updated from within D365FO.
If you need to update a template frequently without developer involvement, consider Azure Blob Storage or SharePoint storage instead. AOT resources are best suited for templates that are stable and version-controlled alongside the model code.
Related Resources
- How-To Manual: Store Docentric Templates as AOT Resources


