Frustrated about customers complaining that Roll-up fields are not calculating at runtime? Abandoned rollup fields and went for something custom because customer couldn’t afford the calculation to happen every hour? The good news is that you do not need to worry about all these any longer. The new Automatic Rollup Calculator solution from XrmForYou tackles all these scenario and does much more.
Dynamics 365 offers a wonderful UI based editor to define your roll-up fields. It’s quite powerful. However whenever we go to customer and say that roll-up fields are not calculated at run-time, it puts us in some shaky situation. Our tool does the following:
- Identifies any changes in the child entities involved in the roll-up field definition and automatically calculates the roll-up field values
- Handles scenario when
- Child record is created
- Child record is deleted
- Child record is updated. Handles both the scenarios when associated parent of the child record is changed or the field of the child entity involved in the calculation of roll-up field is updated.
- On-demand calculation of all roll-up fields of a record.
And all of these with just few configuration steps. So let’s see how our tool works.
The tool comes in the form of managed solution. Once you install, it will appear in your solutions area.
Solution Name – XrmForYou.RollupfieldCalculator.
Open up the solution and navigate to the configuration Page. You will see a screen like the one shown below.
For this documentation, I have set up the following structure.
- Created an Entity – Test Entity
- Set-up 1:N relationship with Contact
- Created two roll-up fields
- Count of Contacts – Rollup field showing the number of contacts associated with the Test Entity
- Contact Credit Limit Sum – Rollup field showing the aggregate of the credit limit field of the contacts associated with the Test Entity.
Definition of both the fields in screenshots below.
Okay. So far so good.
I select my Test Entity from the DropDown and all the roll-up fields of the entity shows up.
This UI helps me pick and choose which roll-up field I want to enable for automatic calculation
I select both and click on Save Configurations button. The system will start setting the roll-up field configuration for the selected fields. You can monitor the state of the operation by going to Settings –> System Jobs
JobName – x4uru_ActionRegisterSDKStep.
If the job fails, you need to open and see the error. If the job succeeds, it will disappear from the system jobs list.
Once successful, you are all set.
For testing I create two records – “Test Record 1” & “Test Record 2”.
For both the records the roll-up fields are showing 0 which is expected.
I open up Test Record 1 and associated 4 contacts.
If I now refresh, my advanced find view, I can immediately see the roll-up fields being updated.
Please note that in order to avoid any performance issues, the roll-up field calculation happens through asynchronously the moment any changes are made to the child entity. Hence if your async job is stuck sometimes you may experience a bit of delay. But usually all this will happen within seconds of updating the child entity.
Now I open up any contact associated with Test record 1 and associate it with Test Record 2.
Immediately when I come back and refresh my advanced find view, I can see the results.
Cool. Now before I wind up, there is one more feature that the tool comes with. Once you install the solution and open up any entity form, you will see a new button in the Menu called – “Calculate Roll-up Fields”.
Say you don’t want to go for automatic calculation but you want the user to have an option of updating all the rollup fields on a record on-demand. You have this option which allows you to do exactly like that.
Click on the button and the dialog pops-up where you can pick and choose the roll-up fields to be updated.
Select the desired fields and then click on Update. The page will refresh to show the latest roll-up data.
If you believe this tool works for your organization, you can request for trial and pricing at email@example.com.
Video and documentation will be uploaded in our website www.xrmforyou.com soon.
Published at Wed, 01 Aug 2018 15:38:38 +0000