Search code examples
dynamics-crmcrmmicrosoft-dynamicsdynamics-crm-2015

How to use calculated fields on a form with many nulls (Dynamics CRM)


I am building a form that is essentially a large matrix with row and column totals. I want to use calculated fields for the row and column totals.

However, a typical user would often have many nulls in the form. Calculated fields show null if any of the fields in the formula are null.

What is the best way to solve this problem?

My best idea has been to make all of the fields required. This would require the user to tab through the form and enter lots of zeroes (not ideal). But I can't think of any other options.

I don't want to build a calculated field for every field that equals zero if the field is null (too many fields to make this practical).

Thanks!


Solution

  • Use JavaScript to do the calculation instead.

    Or use JavaScript/business rules to set a default value of 0 in each field, and make the field required.

    Or force the user to save the record once, then use a synchronous workflow to populate the fields with default values.