• Release History
  • Documentation
  • Back to www.mscrm-addons.com
  • Release History
  • Documentation
  • Back to www.mscrm-addons.com
home/Knowledge Base/Template Designer(DCP)/How to use product translations in DoumentsCorePack templates

How to use product translations in DoumentsCorePack templates

746 views 0 Updated on July 26, 2022

Microsoft Dynamics 365 allows to define translations for product properties like product name or product description as can be seen in this article. By default, DocumentsCorePack will load the language defined by the user that is generating the doucment. This article describes how to set the language to be loaded into a certain template.

Use Case: Let’s assume your office is in England and your users are all using Dynamics 365 in english but you have customers out of Germany you need to send German documents that should show the German names of the products accordingly.

Product translations are stored in the so called “Business Data Localized Label“-table. This entity is only loosely bound to the product entity and the fields within do not have Display Names. Therefore you will need to perform the following steps to retrieve fields in the desired language:

1. Enable support for fields without Display Name

First, we need to enable our Template Designer within Microsoft Word to work with fields that do not have a Display Name defined. This can be done by

  1. Opening the “Insert MailMerge Fields“-taskbar
  2. Open the treeview settings
  3. Enable the “Add fields without DisplayName” option and hit OK
Fig 1: Enable support for fields without displayname

2. Add relationship to your template

Typically you will need product translations to be available for products. Thus, we would recommend to resolve the relationship to products (e.g. Quote ⇒ Quote Detail ⇒ Product) using our relationship designer.

Since the translation is only loosely bound we cannot use our relationship designer but will need to add the fetch-statement that retrieves translations to our query manually. To do so, please open the relationship in edit mode.

  1. Select the “Additional“-tab
  2. Select the relationship to the product entity you want to add translations to
  3. Press the “Edit” button
  4. Switch to the “FetchXML” Tab
Fig 2: Opening the FetchXML statement of your relationship

Now to the most important part: Adding the relationship to deliver translated content in the preferred language.
The fetch-to be added looks as follows:

<link-entity name='businessdatalocalizedlabel' from='objectid' to='productid' alias='productid_businessdatalocalizedlabel'>
	<attribute name='languageid' />
	<attribute name='label' />
	<attribute name='objectcolumnname' />
	<attribute name='businessdatalocalizedlabelid' />
	<filter type='and'>
		<condition attribute='objectidtypecode' operator='eq' value='1024' />
		<condition attribute='objectcolumnname' operator='eq' value='name' />
		<condition attribute='languageid' operator='eq' value='1031' />
	</filter>
</link-entity>

IMPORTANT: The language-id specified in the following line defines the language to be retrieved. You can find the codes in Dynamics 365 ⇒ Advanced Settings ⇒ Administration ⇒ Languages

<condition attribute='languageid' operator='eq' value='1031' />

In our case we choose to load 1031 (German).

We recommend to copy the above fetch statement, set the language-id as needed and add it to your fetch from the predefined relationship. In our case this looks as follows:

Fig 3: Add fetch-statement for loading translated content to your fetchxml

Hit Ok. A new node “Business Data Localized Label” will now be visible in your tree.

3. Add field to your template

The field that will now deliver the product name in the correct language is called “*label“. You can go ahead and ad this field to your document as needed.

You will also find a working demo-template that has the relationship included attached to this document.

Attached Files
#
File Type
File Size
Download
1 .docx 29.25 KB ProductTranslation_Demo_Template

Was this helpful?

Yes  No
Related Articles
  • Integrating JSON data into documents
  • Simplify Contract Processes with Dynamics 365 + E-Signature 
  • 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
Leave A Comment Cancel reply

You must be logged in to post a comment.

Latest Articles
  • “Undefined”-labels in Chrome 114 and higher
  • Integrating JSON data into documents
  • Generate large documents using the Multipart-feature of DocumentsCorePack 
  • Recap: DynamicsMinds Conference 2023
  • How to automate the E-signature process via Power Automate
Popular Articles
  • DocumentsCorePack Template Designer – Getting Started
  • Where do I find the Unique Organization name in Microsoft Dynamics 365?
  • Step-by-Step: How to configure a One-Click-Action
  • mscrm-addons.com Application Access for Dynamics 365 (App Access) – DocumentsCorePack
  • DocumentsCorePack Online Service Configuration
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
  • “Blocked by Conditional access” error in Azure Active Directory
  • Online Services: Required Application Permissions
Categories
  • *News and General Infos* 52
  • Webinars 36
  • Template Designer(DCP 181
  • DocumentsCorePack(DCP 197
  • 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.