• Archive
  • Back to www.mscrm-addons.com
  • Archive
  • Back to www.mscrm-addons.com
home/Knowledge Base/Template Designer(DCP)

How to use product translations in DoumentsCorePack templates

58 views 0

Written by Michael Dohr
November 25, 2020

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.docx29.25 KBProductTranslation_Demo_Template

Was this helpful?

Yes  No
Related Articles
  • How licenses are counted
  • How to setup editable sections in your template (Dynamics 365)
  • Concatenate Syntax
  • Document Name (Dynamics 365)
  • How to change TemplateDesigner-Connection via DataProvider
  • How to restart the DocumentsCorePack dataprovider
Leave A Comment Cancel reply

Latest Articles
  • How do I create a document and attach it or use it as the body of an email in a single workflow step in MS Dynamics 365 Online?
  • How licenses are counted
  • IMPORTANT information for Dynamics 365 Online customers using ActivityTools, AttachmentExtractor, PowerSearch or SmartBar
  • How to check the existence or the value of a SettingsKey in MS Dynamics 365
  • Error message during Dynamics 365 Connection setup with Ws-Trust endpoint authentication
Popular Articles
  • How to activate the DocumentsCorePack connector for PowerApps & Microsoft Flow
  • How licenses are counted
  • Where do I find the Unique Organization name in Microsoft Dynamics 365?
  • How to work with the new DocumentsCorePack custom connector for PowerAutomate (Microsoft Flow)
  • DocumentsCorePack Charts Feature (Dynamics 365)
Top Rated Articles
  • How to activate the DocumentsCorePack connector for PowerApps & Microsoft Flow
  • Can you save data capacity by moving email content?
  • How to work with the new DocumentsCorePack custom connector for PowerAutomate (Microsoft Flow)
  • DocumentsCorePack Online Scheme
  • Recap of the first virtual eXtreme365 & Community Summit event
Categories
  • *News and General Infos* 42
  • Template Designer(DCP 147
  • DocumentsCorePack(DCP 144
  • TelephoneIntegration (TI 62
  • AttachmentExtractor (AE 47
  • PowerSearch (PS 43
  • ActivityTools (AT 55
  • SmartBar (SB 50
  • GroupCalendar (GC 43
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
  • © 2020 www.mscrm-addons.com. All Rights Reserved.