I have a field in opportunity of type currency. When I put decimal data in that field I am able to create opportunity but when I am trying to update with same data it is giving error of casting.
Do I need to convert decimal data to currency type. if yes can anyone has idea to convert decimal to currency in c#.
I got the answer,
myEntity.Attributes["abc_transactionamount"] = new Money((decimal)obj.TotalAmountToPay);
I'm not sure that you should need to covert the type.
If you do maybe you could use: