I have a property on a .NET Object that is of type decimal? (Nullable decimal), which i need as an entry in a table Field (decimal).
I created a variable of type System.Decimal to make the code more explisitt - and according to MSDN there is a implisitt mapping between System.Decimal (.NET) to Decimal (C/AL).
Decimal := Invoice.Tax;
IF NOT ISNULL(Decimal) THEN
"Harvest Invoice Header".Tax := Decimal;
But this gives me the following error:
"Type Conversion is not possible because 1 of the operators contains an invalid type.
Decimal := DotNet"
Is there anyways around this?
Answers
http://forum.mibuso.com/discussion/62097/nav2013r2-net-webservice-decimals-all-null
I also encountered this problem a few days ago trying to do some WebService Communication with an early build of 2013R2. Depending on how/where you want to use your nullables, you got to look for a workaround if the link above doesn't help you.
I suppose you can use
"Harvest Invoice Header".Tax := Decimal.Value;
Hope it helps
Oki