Wednesday, June 5, 2019

Dissecting Rollup Fields in Dynamic 365


If you are looking to Modify Recurrence for a Roll-up field, you can refer my earlier blog post here - https://vjcity.blogspot.com/2019/06/how-to-change-frequency-for-rollup.html


If you are looking to refresh Rollup field dynamically on the form 
at run-time refer here - Refreshing Rollup field using JavaScript


There were few freaking business scenarios that I came across which were blowing my mind up. I cannot operate on them as it was client productions so, I ended up doing my separate Rnd to understand and have a closer look at Rollup fields in Dynamic CRM.

1) Last Updated On: All Rollup Fields are provided with supported datetime field (always Read-Only) which state when was the last time the respective rollup field got update. Below is a self-explanatory image.




2) Manual Hard Refresh: A business user can manually refresh the values of the respective roll-up field on the given form.




3) Rollup field gets refreshed even when the Parent Record is De-Activated.

An Example:
  • Deactivated a contact record and try adding an opportunity.
  • Rollup field gets refreshed by system job automatically and job does not consider state of parent entity.
  • Usually we interpret that form is locked once it is de-activated, but this rules does not apply on Rollup field.


I added a single opportunity and checked its Rollup values and then deactivated the contact record.

Even on the deactivated contact record, I added few opportunities.





4) Modifying Recurrence only affect with next Cycle.
I did some testing and come up with this conclusion. I was having few Rollup field on contact entity and by default its recurrence time was set to 12 Hours. Even after changing recurrence to 1 Hour, the rollup fields were not recalculating the values. I checked for few hours to see if they recalculate the values and even more surprisingly  when looking at system jobs I found that they were running and were Succeeded but they do not show any result. The values got changed in the next morning and then it accepted the change in recurrence for recalculating the Rollup field with every 1 hour.


I believe there is a super process running in Microsoft Background which keeps monitoring these value changes not immediately but some scheduled time.

So it is very important to think at least twice when we are choosing to have Roll-up field.

Regards,

vipinjaiswal12@gmail.com

No comments: