You need to sign in to do that
Don't have an account?
Laytro80
Rollup with our master - detail
Hi,
I have need to roll up data from one object to another but cannot use a master detail relationship.
I have an object called project and an object called time sheet.
When a timesheet is created and linked to project I want to sum all related time sheet records.
I would usually use a master detail relationship but I can't lock timesheet to project as timesheets can be agains most objects.
Is there an easy way every time a time sheet is added to project to have a field - total time spent calculate?
Thanks
Ross
Hi Ross,
I hope the below community post will help you
http://forums.crmsuccess.com/t5/Apex-Code-Development/Rollup-Summary-on-Lookup-from-Opportunity-to-Custom-Object/td-p/164647
Thanks,
Prafull
All Answers
Hi Ross,
If you dont want to use Master Detail relationship to roll up then Probably you need to write an apex trigger to achieve this functionality.
The trigger should be written on events after insert, after update and after delete.
Thanks,
Prafull
Thanks for the Prafull,
Are there any similar tutorials or examples.
Essentially I have an object called project__c and an object called time_sheet__c.
I need to sum up time_spent__c on the time_sheet__c object for all time sheets per project.
I then need to update time spent every time I insert,update and delete a time_sheet__c.
Thanks Ross
Hi Ross,
I hope the below community post will help you
http://forums.crmsuccess.com/t5/Apex-Code-Development/Rollup-Summary-on-Lookup-from-Opportunity-to-Custom-Object/td-p/164647
Thanks,
Prafull
Thanks I have used this to write my apex triggers.
Cheers
R