Hi Everyone,
after moving from NAV 2009 to NAV 2016 I noticed that I can't use automation objects if I want to import from external sources using Job Queue. So I wanted to move my code from Automation to DotNet. So far it's looking well but now I have a problem and don't know what to do.
With Automation I could do the following:
TempNAVaddress.address_number := Recordset.Fields.Item('address_number').Value;
but when I want to do the same with DotNet I get an error when I try to address the field with the name:
A call to System.__ComObject.get_Item failed with this message: The type of one or more arguments does not match the method's parameter type.
I tried the following already (nothing worked):
- put the fieldname in a text-variable
- use 0 instead of 'address_number'
- put the 0 in an integer variable
- put the fieldname in a VARIANT-Variable
Everything I can find on MSDN hint's that this should work. So what am I missing here? Any help would be greatly appreciated.
0
Answers
I had exacly the same problem!