Fire event when a record is removed from subpanel

Hi,
maybe its a particulat question…i need to sum some quantities and i need to update it when a record is added or removed from subpanel…

Any way to do this?

Thanks

you can take a look at two hooks after_relationship_add and after_relationship_delete

http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_6.5/Module_Framework/Logic_Hooks/Module_Hooks/

best regards