Thursday 11 July 2013

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

I was writing a javascript function and during testing kept getting "A currency is required if a value exists in a money field. Select a currency and try again." while attempting to enter data into the field.

Basically what had happened was a currency field was added to an existing CRM entity.  CRM doesn't like this for some weird reason.

After googling alot of people suggested that you write javascript to set the currency onload.  This to me seemed like a bit of a hack which i'd prefer to avoid.  Instead do the following:

Step 1 - Go to File -> Options
Then in the first tab General go down to "Select a default currency". Set it to the appropriate value.
NOTE: This is a user setting so this needs to be repeated for all users however HOPEFULLY this is already set.

Step 2 - Add the "Currency" field to the form for the entity you are having issues with. Save and Publish

Step 3 - Select all existing records for the entity and "Edit"

Step 4 - Click on the currency lookup and select the required currency. Save the changes

You will now find the required currency symbol appears in the field and you can happily enter data into the field!

No comments:

Post a Comment