I need to create rollup summary type of field on Object A by summing specific field from Object B where Object A is master, Object B is child and there exists a lookup relationship between the two. What is the best approach to achieve this. EDIT: I cannot change the type of relationship from lookup to Master Detail.
1 Answer
You have a few options here. As @Nick Cook mentioned in a comment, you could change the relationship to Master-Detail but this could cause a lot of work as all the reports on that field would have to be recreated.
If you decide you want to leave it as a lookup relationship, you have two basic options to create the rollup yourself. You can try to find an app on the app exchange that does this for you or you can try to build it yourself via Apex.
If you want to find an app on the app exchange, I would recommend the rollup helper (**** I have no personal affiliation or interest in this product, just one that I have used in the past and works well). The rollup helper can be found here.
If you want to go the route of coding, there are a few nifty packages out there that I would look into
Anthony Victorio wrote a nice utility for creating your own rollups. Take a look here.
Andy Fawcett also wrote a utility for this as well that you can find here
Hope this helps.