Announcements
Hello!
I've created a calculated field in each of the lines Orders entity and then I need to use each one of these fields in the Invoice entity and add them using a rollup field.
Please your advice with this topic.
Regards,
Nicolas
Thanks for your answer Leah Ju.
For the Orders entity I've created a rule to copy de calculated field in a new field (in the same form) and then use these results in the Invoice entity rollup field. But the problem is that the Orders entity has many lines (I upload the information using an Excel file) and I have to enter line by line to update the rule output field in order to be effective because the form doesn't refresh immediately.
Do you know if there is a different and better solution?
Kind Regards,
Nicolas
Hi Nhead,
Rollup fields are only supported over related entities with a one-to-many relationship.
So you need create 1:N relationship between order line and Invoice entities, calculated fields in child records(order line) and rollup field in parent records (Invoice) in your scenario.
And as IllerisJS mentioned, “A rollup can't reference a calculated field that uses another calculated field”, which does not mean that all calculated fields are not allowed to appear in the summary field configuration, just not for the secondary calculated fields.
For example, calculate1 and calculate2 is a calculated filed from general fields, calculate3 is a calculated filed from another two calculated fields (1 and 2).
Now, go to rollup field configuration page, calculate1 and calculate2 fields can show in the list, but calculates3 field can't show.
you can refer it to know how to set rollup field: https://www.encorebusiness.com/blog/rollup-fields-in-microsoft-dynamics-365-crm/
If the calculated field you are using is the secondary calculated field, you can use js code to replace calculated field, which can use results in rollup field, you can refer my answer in the following thread:
Or you can provide more detailed information about it, so that I can give you more detailed solutions.
Regards,
Leah Ju
Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.
You do not. See community.dynamics.com/.../rollup-field-sum-calculated-field
It is not possible to reference a calculated field from a rollup field.
Alternative: use a PowerAutomate flow that triggers on order line and updates the above hierarchy ;-)
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156