Quantcast
Viewing all articles
Browse latest Browse all 24688

How to assign money value to CRM money field in Script component?

Hi All,

Can anyone please help me with below issue?

I have a money value (eg. 25.00) in the SQL table (Source) of type string which I am reading it in script component and want to push that same to MS CRM(destination) currency field.

I have used Money class but still it is throwing the exception "System.InvalidCastException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #444AFC47"

Used this lines of code. Please let me know if I am doing anything wrong and help with resolution.

                if (!Row.Amount_IsNull)
                {
                    Money Amount = new Money();
                    Amount.Value = Convert.ToDecimal(Row.Amount);
                    newTbldetails["new_amount"] = Amount.Value;
                }

Note: new_amount is the attribute in MS CRM (destination) with type Currency.

Thanks,

Sri


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>