title: Dynamics AX 2012 parsing Int32 to table field integer
body: <p>I'm using a referenced DLL to retrieve data from a webservice. The data retrieves well. I copy over some of the fields to inMemory tables. This works well unless for the Int32 types.</p>
  
  <p><img src="https://i.stack.imgur.com/C8STr.jpg" alt="Code example:"></p>
  
  <p>As you can see, the Id field is of type Int32. The table field (ProductId) is an Integer.
  This compiles without errors, but when i run the code i get the following error:</p>
  
  <pre><code>Error executing code: Wrong argument types in variable assignment.
  </code></pre>
  
  <p>This error points to the line with the productId. Removing it makes the code work. I've also tried making the Id a string, and then str2int() the field but that doesn't work either.</p>
  
  <p>Any idea's?</p>
  
  <p>Thanks,
  steve</p>