We need an additional Set of Rollup fields which exceed Salesforce limit of 40 Rollup Fields on master detail records
The trigger should take consideration into all the below scenario's.
- Should Update the old and Newly assigned parent record if the child record is re-assigned to a different Parent Record.
- Should update the parent record if all the child records get deleted.