Following is the exact scenario in my Dynamics CRM instance.
I have created a custom entity (say, Order), which is having a lookup field (say, Item). The lookup field is pointing to another entity which is having a currency field (say, Amount). I have created a roll-up field (say, Total Amount) in Order entity, and set it to calculate sum of Amount for all items for the order. Once created, I have placed the control on main form of the entity.
When I try to check the value of rollup field (by clicking Refresh icon of the roll-up field), it gives me following error:
Record currency is required to calculate rollup field of type currency. Provide a currency and try again.
I tried similar for Account and Opportunities entities, and the new rollup field works perfectly there.
Any idea why it doesn't work for the custom entity? Do I need to do anything extra at entity or form level?
You will receive the error Provide a currency and try again for all records created before you created the rollup field, since they will not contain valid data in the Currency (TransactionCurrencyId
) field.
Any records created after you added the field should automatically have the currency field set, and the rollup field should thus work correctly.
Since Account and Opportunity both contain currency fields out of the box, all records of these types will have the Currency field set correctly. It is thus not an issue to later add a currency rollup field.
You will need to set the Currency field on the existing (custom) Order records for the rollups to work correctly. This can e.g. be done by adding the Currency field to the form, and selecting the right currency for each Order (either manually, using bulk edit, or by creating a workflow).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With