title: Axapta store RecId as AnyType
body: <p>When I store a RecId in an anytype object, the number is corrupted.  In my implementation, I am storing the RecId in a treeview item's data value field.  Whenever I retrieve the data value, the number I saved is always greatly changed.  Any suggestions?</p>
  
  <p>Here is an example:</p>
  
  <pre><code>void fillTree()
  {
      ABC_Menus _ABC_Menus;
      TreeItemIdx parentItemIdx;
      ;
      while select Prompt, RecId from _ABC_Menus
      {
          parentItemIdx = SysFormTreeControl::addTreeItem(formTreeControl, _ABC_Menus.Prompt, FormTreeAdd::Root, _ABC_Menus.RecId, 0, true);
      }
  }
  
  public void endLabelEdit(int _idx, str _text, anytype _data)
  {
      FormTreeItem formTreeItem = this.getItem(_idx);
      ;
      formTreeItem.text(_text);
      this.setItem(formTreeItem);
      info(_data);     //this number comes out all wrong
      super(_idx, _text, _data);
  }
  </code></pre>
  
  <p>I am storing the RecId in the tree value field.  However, if I retrieve it later, a totally different number comes back out.<br>
  - RecId in table: 5637144588<br>
  - RecId displayed by the endLabelEdit method: 202520592908288</p>
  
  <p>I also tried using num2str(ABC_Table.RecId, 0, 0, 0) when storing the RecId in the field.  When stored that way, the number matches, but an "Assignment/Comparison loses precision" warning is thrown.  Is that ok, or is there a better way?</p>
  
  <p>Thanks</p>