Skip to content
●
Microsoft-Focused Solutions & Delivery
|
Dynamics 365 · Business Central · Power Platform
|
Global Delivery · UAE Presence
Core Microsoft Platforms

Sales, Customer Service, Project Operations

ERP & CRM Integration, APIs & Data Workflows

Power Apps, Automate, BI, Pages & Dataverse

Specialist Services

APIs, Azure Logic Apps, Webhooks & SQL

8-Step Controlled Validation & Relational Mapping

Copilot Studio, Governed Pilots & Agents

Health Checks, Workflow Fixes & Rescues

SkySoft Standalone Software
InspectionsTrack ↗

Digital inspection and reporting software for industrial operations.

SkySoft Compliance ↗

Digital QSE and compliance workflows for construction teams.

Confidential delivery capacity behind your partner brand

Senior specialists for project teams and ongoing backlogs

SkySoft Insights

How to Display Document Templates Using a Custom Subgrid in CRM:

By default, all document templates from an entity are displayed in the form ribbon, as shown in the screenshot From CRM.

How to Display Document Templates Using a Custom Subgrid in CRM:

However, if someone wants to display this list of documents directly on the form, there is no out-of-the-box feature to show only the documents related to a specific entity and allow downloads on click.

To achieve this, we will use a custom HTML web resource to display the document list on the CRM form and enable downloads on click. let’s Explore Complete Article on Display Document Templates with a Custom Subgrid in CRM.

How to Display Document Templates Using a Custom Subgrid in CRM:

Step by Step Guide:

Step 1:

First, create an HTML web resource and write code to display a simple table.

Step by Step Guide To Write HTML COde

Step 2:

Write a JavaScript function that triggers on the form onLoad event to retrieve document templates, filter them based on your criteria, and store them in an array.

Step 3:

Then, write a function to display all the templates stored in the array in a table. Each row should contain an anchor tag that allows users to download the template when clicked.

Step 4:

Then, write a function to download the template by passing the template ID and template name.

Then, write a function to download the template by passing the template ID and template name.

Step 5:

After completing this, create an HTML web resource in the solution in Power Apps.

After completing this, create an HTML web resource in the solution in Power Apps.

Then paste your code here and save and publish web resource.

After completing this, create an HTML web resource in the solution in Power Apps.

Step 6:

Then navigate to Power Apps and add an empty section to the form.

Then navigate to Power Apps and add an empty section to the form.

Step 7:

Next, open the Display dropdown, navigate to the HTML Web Resource section, and select your registered HTML web resource.

Next, open the Display dropdown, navigate to the HTML Web Resource section, and select your registered HTML web resource.

Step 8:

After that save and publish form.

Display Document Templates with a Custom Subgrid in CRM

Conclusion

By following these steps, you can successfully Display Document Templates with a Custom Subgrid in CRM. This approach enhances user experience by allowing direct access to relevant document templates within the form, streamlining workflows and improving efficiency. Implementing an HTML web resource ensures a customized, user-friendly interface for document management.

Readmore: access teams manage record security in dynamics 365

FAQ’s

Can I filter document templates based on user roles?

Yes, you can modify the JavaScript function to filter templates based on user roles by retrieving the user’s security roles and applying conditions accordingly.

Will this solution work on both model-driven and canvas apps?

This approach is specifically designed for model-driven apps. For canvas apps, a different method using Power Automate or embedded controls may be required.

How can I ensure the document list updates dynamically?

You can refresh the HTML web resource using JavaScript whenever a relevant action occurs, such as form save or a field change event.