Converting external data type to X++ type

Hi,

i am consuming a web service from dynamics navision to dynamics ax 2012.

when i retrieve data from navision tables , i always face the problem of conversions between data types in navision and data types in dynamics ax 2012 , i retrieved a data with String type from navision and i have to cast it to str type from dynamics ax and when i tried to cast it , this error is displayed

“CLR object cannot be marshaled to Microsoft Dynamics anytype”

can anyone help me for this problem?

thank you

If you’re not familiar with that, read How to: Marshal Between X++ and CLR Primitive Types. Then verify that the CLR type is what you expect. If you don’t see any problem, show us your code.