x++


Dynamics AX 2012 parsing Int32 to table field integer


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.
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:
Error executing code: Wrong argument types in variable assignment.
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.
Any idea's?
Thanks,
steve
Try to marshal explicitly between the two types:
System.Int32 netInt;
int xppInt;
;
// -- Other code
// ...
netInt = product.get_Id();
xppInt = netInt;
tempData.ProductId = xppInt;

Related Links

Clients seem to be running old (buggy) code after XPO project import
Number sequence AX 2012
SSRS MS words report with page break
How can you get a detailed error descriptions in Dynamics AX?
How to get the length of an array?
X++ loop through lines in grid control
Concatenating row values in x++
How do you access a macro in the AOT macro node?
How can I set the Backgoundcolor of an AX2012 Action Pane Button
How to Edit address using X++ in AX 2012
Number sequence issue Ax 2012?
Find code that's running in a Batch Job
What is the _isMexican boolean for in the Global::Checkpower method?
AlwaysOnTop property not behaving properly
Boolean AND logic in Microsoft Dynamics AX 2012 AIF QueryCriteria
Table: PrintMgmtSettings Field: Printjobsettings(Blob)

Categories

HOME
ggplot2
forms
jmeter
webdriver
fpga
pyqt
powerpoint
rsa
pascal
components
graphics
solver
shiro
replace
cublas
3d-reconstruction
telegram-bot
square
flume
performancepoint
mql5
minecraft-forge
dkim
why3
emoji
line
php-5.6
frequency-distribution
zerobrane
3nf
cumulocity
qsqlquery
linear-algebra
glyphicons
aws-sdk
google-container-registry
mapstruct
google-maps-autocomplete
scriptella
data.stackexchange.com
pylons
delimiter
entity-relationship-model
tpm
sinch
bioinformatics
realm-mobile-platform
autodesk-designautomation
anki
testbed
hibernate-validator
instantiation
activexobject
reactjs.net
sql-delete
searchkit
xcode7.3
openalpr
dm-script
amazon-ses
ods
jvmti
berkeley-db-je
cnc
dotnet-httpclient
corruption
singleinstance
ngmaterial
excel-dna
flyout
offline.js
bootstrap-tags-input
materialized-path-pattern
docpad
custom-lists
redbeard-ios
async.js
signalr.client
macaulay2
udpclient
clipboard.js
swizzling
php-socket
data-protection
project-organization
cda
yajsw
rasterize
wiredep
dock
finalbuilder
eoferror
sql-server-data-tools
document-repository
delayed-execution
variadic-templates
rapidsvn
boost-program-options
mruby
viewer
android-vibration
entry-point
template-deduction
ss7
dot42
extjs2
decoupling
windows-embedded-standard
ie8-compatibility-mode
breakout
cocoalibspotify-2.0
tlf
expression-blend-4
exponentiation
unattended-processing
django-paypal
ruby-1.8
objective-j
message-passing
visualj#
business-model
pnrp

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App