Conversions provide the ability to change values based on fixed rules. They can be stored globally for a Mapping Version or attached to each field individually. For a detailed description of applying a conversion to a value, see Value Classes and Field Values.
To create a conversion card
- Choose the icon, enter Data Integration Framework Conversions, and then choose the related link.
- Choose the Edit action to open an existing card.
There are three types of Conversions that are determined in the Type field on the Lines FastTab:
- Fixed Value - Converts everything to the Fixed Value field, regardless of the received value.
- Value Table - For this type, choose the Show Value Table action on the Manage menu of the Lines FastTab to open the relevant value table and store a From-Value To-Value Conversion.
If Type = Value Table, the If Value Not Exist field becomes editable. The options are:
- Use Unconverted Value – Value is maintained; default option.
- Blank Value – Result of the Conversion is equal to Blank.
- Source Code - Indicates a conversion within a piece of source code. Additional Source Code Tags can be managed by the OnBeforeConvertValueByTag() event of Codeunit 5100918, DIS - Conversion Mgt.
A Conversion is only valid if the conditions in the Repository List and Repository Field fields match the current action. However, there is a related field origin only for Value Class = Record Pool. For all other Value Classes (see Value Classes and Field Values), a conversion line is only valid when both fields are empty.
Product-specific source code tags
The source code tags specific to COSMO Data Integration Framework are described in the following table:
|Source code tag||Description|
|BASE2BYTES||Converts a Base64 text into a DotNet byte-array. Used for import from an XML file into a BLOB field, for example.|
|BC2DATETIME||Makes a Microsoft Dynamics 365 Business Central datetime value out of a Microsoft Dynamics 365 Business Central date or time value.|
|BYTES2BASE||Converts a DotNet byte-array into a Base63 text. Therefore, a binary field can be saved into an XML node.|
|FORMAT||Executes a common Microsoft Dynamics 365 Business Central Format on the value. For example, it shows the textual value of an option field (Order instead of 1 for the Document Type field in the Sales Header table).|
|FORMATXML||Converts the value into XML format. Executes a common Microsoft Dynamics 365 Business Central Format with property 9 on the value.|
|XML2DATE||Converts an XML text value into a Microsoft Dynamics 365 Business Central date. Therefore, the textual value must be from format XML, like <Year>-<Month>-<Day>.|
|XML2DECIMAL||Converts an XML text value into a decimal. Therefore, the textual value must be from format XML, with a dot (.) as decimal separator.|
|XML2RECID||Converts an XML text value into a Microsoft Dynamics 365 Business Central RecordID. Therefore, the textual value must be from format XML.|
|XMLXPATH||Converts an XML text value into a valid XPath expression.|
For field conversion with Value Class = Record Pool, the table and field name of a Conversion Line is searched first. If no field name can be found, then the table name is used for the setting. If no table name can be found, a search is performed for a line without a table and field name.
If a conversion is stored global for a Mapping Version, and for this a conversion line exists without table and field name, then theoretically each value at every point of the Mapping is converted during the entire process. Therefore, take care when using global conversions.
Submit feedback for.