I am new to Dynamic 365 CRM and am having issue with the formula in calculated fields. The calculated field is a sum of 5 currency fields and it shows up as NULL if any one of the currency field is NULL. From my research it looks like I have only 2 options
1) Create a workflow to update these fields to $0 on create/update entities.
Note: This may not be ideal for all situations to store $0 for NULLS in all the entities. Also we may need to update the existing records.
2) Create a calculated field for each of the NULL field to store $0 instead of NULL and use the new calculated fields in the formula instead of the original fields.
Note: This sounds logical but adding additional calculated fields for each field in a formula seems to be redundant.
I looked at the available formulas in the calculated fields but looks like there is none for the currency fields. Both these approach has pros and cons, is there a better way to handle NULL's in the calculated fields.
Thanks.
*This post is locked for comments
Hello,
Then you will have to leave idea of code-less solution behind and use plugins for calculations.
Thanks for the reply Shoaib.
In our application, we cannot set the currency fields to be $0, for example, for a bank statement, balance of NULL is totally different from $0.
Hi,
It is best practice to set currency to 0 by default as they are required in calculation.
One option is to populate these fields to 0 using Business Rules. Have a look at below article.
http://www.marksgroup.net/blog/dynamics-365-using-business-rules-set-default-values/
You can run a background workflow to set existing null values to 0 or export all records and re import after setting it to 0 in excel or excel online.
Thanks,
Shoaib
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156