CRM 4 Currency Calculations

One of my current projects involves a heavily customized Opportunity form and I was running into the following error messages whenever I attempted to set the value of a custom Attribute which was of a Money type:

A currency is required if a value exists in a money field. Select a currency and try again.

The solution, believe it or not, is stated right there in the error message:

You must select a Currency before you can populate any Money field.

I thought this was a rather odd behavior, until I realized the root cause of issue.

I was testing out my calculation, which involved three form fields, within the Form Preview ( Create, to be exact ).  It turns out that the Currency is not automatically populated during the Preview, so my attempt to set a Money field was failing.

Once published, and operated normally, the Currency field is populated with the default currency as specified for/by the user.

Just to be safe, I added the transactioncurrencyid Attribute to the list of Attributes that must be completed before the calculation will be performed.

2 thoughts on “CRM 4 Currency Calculations”

  1. Thanks a lot – I was looking at that message trying to figure out what I had done and how to fix it. I published it and it works just like you said.

  2. Hi there,

    I get this peculiar error, tried to publish the form again but the problem still persists. I wonder what else might be causing this?

    E

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>