Based on my previous blog, we understand what situation we can use Roll-up summary and what situation we can’t.
Someone has raised an improvement request to Salesforce here. While waiting for this to be implemented, you can try the following workaround using a combination of workflow and trigger. I will explain this using the same example in my previous blog.
Project Object (Parent object)
Project Item Object (Child object)
Product Object (Lookup object)
- Add a new Price (Currency 16, 2) field in Project Item Object.
- Implement a workflow in Project Item Object. When a Project Item is created or modified, copy the Product.Price to Project_Item.Price. Once this is implemented, the Roll-up Summary field will work.
- There is another challenge you need to be aware of. When the price is changed at the Product Object, all the Project Item Price will not be updated automatically. That is where you can create a Trigger to overcome this.