• Release History
  • Documentation
  • Back to www.mscrm-addons.com
  • Release History
  • Documentation
  • Back to www.mscrm-addons.com
home/Knowledge Base/Template Designer(DCP)/Using virtual tables in DocumentsCorePack

Using virtual tables in DocumentsCorePack

101 views 0 Updated on March 21, 2023

A virtual table (also called a virtual entity) is a special kind of table that takes data from an external source and represents that data in the form of a table in Microsoft Dataverse.  This data can be manipulated like a normal table.  As such, this means that the data from a dynamic table can be displayed in documents using DocumentsCorePack.

Note: This article assumes general knowledge of virtual tables.  If you are unfamiliar with virtual tables, please visit this link: Get started with virtual tables (entities).

Using data from a virtual table in a template works similarly to normal tables.  Once the table is created and included in your environment, it can be accessed from the Template Designer. 

Prerequisites:

For every template that requires values from virtual tables, the “Use Query Expression” setting must be activated. This setting will convert the relevant FetchXML to Query-Expression, which is what allows for virtual table support:

  • When using a virtual table as the main entity: Check the setting in the Advanced Template Settings.
Use Query-Expression  setting for a DocumentsCorePack template
Figure 1: Selecting the “Use Query Expression” setting in the General tab
  • When using a virtual table via a relationship: Check the setting in the relationship designer.
Figure 2: Selecting the “Use Query Expression” setting in the relationship editor

Note: If this setting is not enabled, an “Sql error: Generic SQL error” will occur during the merge process.

Figure 3: An error message that could occur

Limitations of working with Virtual Tables

  • When using the “Use Query Expression” setting for virtual tables, aggregation and all features that use aggregation (such as Charts) do not work. Hence, we recommend limiting the “Use Query Expression” setting when as possible (e.g. When defined on the relationship level, these limitations would only apply to the specific relationships instead of the entire template).
  • After some internal tests, we cannot verify that creating a 1:N relationship with a virtual table when using SharePoint as an external data source is currently possible. While external articles suggest it is possible (here and here), users should be aware of this potential issue when creating virtual tables for their environments.

Example:

Using a custom virtual table called “Customers” as an example, we can access the base entity from the drop-down like normal.

Selecting a dynamic table via the DocumentsCorePack taskbar
Figure 4: Accessing the dynamic table from the type drop-down in the Template Designer

The fields from this entity can then be included in the template like usual.

Additionally, a relationship to your virtual table can be established in the Relationship Designer. Using “Account” as a base entity, we can form a relationship to “Customers” related to the account.

Establishing a relationship to a virtual talbe
Figure 5: Establishing a relationship to our virtual table

From there, you can select the fields you require from the customer table.

Result

After saving the template to your environment, you can test it out to see if the data is shown in the resulting document.

Example of a template showing fields of a virtual table
Figure 6: Template with fields from our custom virtual table

Generated document showing values from a virtual table
Figure 7: The resulting document created from our template

That’s it!  If you would like to give us any feedback, please contact us by sending an email to support@mscrm-addons.com.

Was this helpful?

Yes  No
Related Articles
  • How to update the metadata in the DocumentsCorePack Template Designer
  • Working with Product Properties in DocumentsCorePack
  • How to work with the Relationship Manager
  • DocumentsCorePack Template Designer Settings
  • How to solve: Failed to connect to an IPC Port
  • How to solve: Failed to connect to an IPC Port
Latest Articles
  • How to share the Connection of the DocumentsCorePack Connector
  • How to update the metadata in the DocumentsCorePack Template Designer
  • Working with Product Properties in DocumentsCorePack
  • How to work with the Relationship Manager
  • Using virtual tables in DocumentsCorePack
Popular Articles
  • Where do I find the Unique Organization name in Microsoft Dynamics 365?
  • DocumentsCorePack Template Designer – Getting Started
  • mscrm-addons.com Application Access for Dynamics 365 (App Access) – DocumentsCorePack
  • DocumentsCorePack Online Service Configuration
  • Step-by-Step: How to configure a One-Click-Action
Top Rated Articles
  • IMPORTANT information for Dynamics 365 online customers using DocumentsCorePack and/or AttachmentExtractor
  • How to activate the DocumentsCorePack connector for PowerApps & Microsoft Flow
  • Step-by-Step: How to configure a One-Click-Action
  • Online Services: Required Application Permissions
  • Where do I find the Unique Organization name in Microsoft Dynamics 365?
Categories
  • *News and General Infos* 51
  • Webinars 35
  • Template Designer(DCP 179
  • DocumentsCorePack(DCP 192
  • TelephoneIntegration (TI 65
  • AttachmentExtractor (AE 62
  • PowerSearch (PS 48
  • ActivityTools (AT 59
  • SmartBar (SB 53
  • GroupCalendar (GC 46
Our Vision

“We see it as our purpose to provide products that simplify and speed up our customers’ Microsoft Dynamics 365 experience.”

Knowledgebase
LogIn
mscrm-addons.com
  • Products
  • Online Shop
  • Downloads
  • My Account
About Us
  • About Us
  • Case Studies
  • Newsletter
  • Partner Program
  • Contact
Support
  • Support
  • Terms & Conditions
  • Documentation
  • Webinars
  • Legal Documents
  • Impressum
  • © 2022 www.mscrm-addons.com. All Rights Reserved.