次の方法で共有


RIM Toolkit vs. RapidStart Services Dezimalzahlen

Der Vorläufer der für die Versionen Microsoft Dynamics NAV 2013 und folgende zur Verfügung stehenden RapidStart Services nannte sich RIM Toolkit. Mit beiden Toolkits lassen sich Daten exportieren und importieren. Kommt man nun auf die Idee Zahlen aus der Version Microsoft Dynamics NAV 2009 zu exportieren und in eine neuere Version zu importieren, so kann es zu Problemen mit dem Format kommen.

Hintergrund ist, dass die Zahlen im RIM Toolkit nicht im XML Format exportiert werden. Folgende Änderung im alten Toolkit macht die Formate kompatibel:

 

+------------------------------------------------------------------------------+
| OBJECT Codeunit 8611 Migration Management |
+------------------------------------------------------------------------------+

---------- Before (BEFORE) ---------- Codeunit 8611 ---------- Function CreateRecordNodes
              FieldRef := RecRef.FIELD(MigrationTableField.FieldID);
              IF Field.GET(RecRef.NUMBER,FieldRef.NUMBER) THEN BEGIN
                FieldNode := SetupDataXML.createElement(GetElementName(FieldRef.NAME));
- FieldNode.text := FORMAT(FieldRef.VALUE);
                IF (NOT ExportToExcel) AND (GLOBALLANGUAGE = 1033) THEN BEGIN
                  IF (Field.Type = Field.Type::Boolean) OR (Field.Type = Field.Type::Option) THEN
                    FieldNode.text := FORMAT(FieldRef.VALUE,0,2);
---------- After (AFTER) ------------------------------------------------------
              FieldRef := RecRef.FIELD(MigrationTableField.FieldID);
              IF Field.GET(RecRef.NUMBER,FieldRef.NUMBER) THEN BEGIN
                FieldNode := SetupDataXML.createElement(GetElementName(FieldRef.NAME));
+ IF (Field.Type = Field.Type::Decimal) THEN
+ FieldNode.text := FORMAT(FieldRef.VALUE,0,9)
+ ELSE
+ FieldNode.text := FORMAT(FieldRef.VALUE);
                IF (NOT ExportToExcel) AND (GLOBALLANGUAGE = 1033) THEN BEGIN
                  IF (Field.Type = Field.Type::Boolean) OR (Field.Type = Field.Type::Option) THEN
                    FieldNode.text := FORMAT(FieldRef.VALUE,0,2);

 

“Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability or fitness for a particular purpose. This mail message assumes that you are familiar with the programming language that is being demonstrated and the tools that are used to create and debug procedures.

 

Mit freundlichem Gruß

Andreas Günther

Microsoft Dynamics Germany