Multi-language fields in import and export scenarios
For some text boxes in Visma Net windows, users can type values in multiple languages if multiple locales are configured in Visma Net. For example: If your Visma Net instance has English and French locales activated and multilingual user input configured, you can specify the value of the Description field in the Stock items (IN202500) window in English and French.
Import of localised field values
As you perform mapping for an import scenario in the Manage import scenarios (SM206025) window, when you need to import localised values of a field, you map this field to a source field that contains a string in JSON format with the localised values. In this string, you use the two-letter ISO code of the language with which the value should be associated.
In the example that is mentioned at the beginning of the topic, if you need to import
the values in English and French to the Description element
of stock item records in the Stock items (IN202500) window, you map
the Description field to a source field that contains data in
the following format: [{en:English description},{fr:French description}].
The mapping example below presumes that the
DescriptionsInJSONFormat source field contains a string in JSON
format.
Import of localised field values
Target object Field/action name Source field/value Stock item summary Description DescriptionsInJSONFormat
In the JSON-formatted string, you should specify
the actual values of the field in all languages that are configured for multilingual
user input.
If you specify the values of the field in particular languages, the values
of the field in other languages configured for multilingual user input become empty. For
example: Suppose that in your instance of Visma Net,
multi-language fields can have values in English and French.
If you pass the value of a
field in the following format [{en:English description}], the French
value of the field becomes empty.
If a source field that you map to a multi-language field contains plain text, this text is saved as the value of the field in the current language of Visma Net (that is, the language that you selected on the login page of Visma Net ).
Export of localised field values
Each text field that supports multiple input languages has a corresponding field with the suffix Translations in its native name. This corresponding field contains all localised values of the text field. For example: The Description field in the Stock items (IN202500) window corresponds to the field with native name Descr. The Descr field has the DescrTranslations corresponding field, which contains the localised descriptions of a stock item.
If you want to export localised values of a text field, on the Mapping tab of the Manage export scenarios (SM207025) window, you map the needed Translations field, which contains localised values, to a target field. The Translations fields are not available in the list of fields in the Field/action name column on the Mapping tab; you should type the needed name manually.
For example: Suppose that you need to export the localised values of the Description element of the Stock items (IN202500) window. You should find out the native name of the Description field, which is Descr, and map the DescrTranslations field to the target field, as shown in the following mapping example.
To find out the native name of a field, in the title bar of the target Visma Net window, click Customisation - Inspect element, and then click the target element in the window. In the Element properties dialog box, which opens, find the value of the Data field element, which is the native name of the field.
Export of localised field values
Source object Field/Action Name Target field/value Stock Item Summary DescrTranslations DESCRIPTION
As a result of the export of localised field values, the target field contains a string in JSON format with the available localised values of the field. The language to which the value belongs is identified by the two-letter ISO code of the language.
For example: Suppose that the Description element of the
Stock items (IN202500) window has
value Item in English and Pièce in French.
In this case, the target
field contains the following string: [{en:Item},{fr:Pièce}].
Parent topic: Configuring scenario mapping