You need to sign in to do that
Don't have an account?
Tena
Custom Rollup Summary Vs. Hidden VF page
I have a custom object that links to a standard object via a junction object. On my custom object I have a field that needs to be a summary of values on the standard object. I see 2 solutions:
1) Create a trigger on the standard object so that when the standard object counts are updated it processes and updates my custom object
- Pro: my number in my custom object will always reflect correctly if using report
- Con: seems like a lot of system usage.
2) Create a Visualforce page and hide it on the custom object page. When the user views the item then the number is updated
- Pro: Won't use as much system resources
- Con: Won't have update numbers on objects if they do reports. The number is only updated when someone opens it from the front end.
I would like to know what others experiences have been regarding this and what they found best.
1) Create a trigger on the standard object so that when the standard object counts are updated it processes and updates my custom object
- Pro: my number in my custom object will always reflect correctly if using report
- Con: seems like a lot of system usage.
2) Create a Visualforce page and hide it on the custom object page. When the user views the item then the number is updated
- Pro: Won't use as much system resources
- Con: Won't have update numbers on objects if they do reports. The number is only updated when someone opens it from the front end.
I would like to know what others experiences have been regarding this and what they found best.
Writing a trigger is the best option, there is not much System usage used just a simple Trigger will do.
There is a sample trigger and also the test class inplace in the blog below,
http://www.anthonyvictorio.com/salesforce/roll-up-summary-trigger/
Regards,
Ashish