Hi kinshibuya
What do you need to do?
1. Create the file custom/modules/Opportunities/logic_hooks.php
PHP Code:
$hook_version = 1;
$hook_array = Array();
$hook_array['before_save'] = Array();
$hook_array['before_save'][] = Array(1, 'calculateField', 'modules/Opportunities/OpportunityLogicHook.php','OpportunityLogicHook', 'calculateField');
2. Create the file modules/Opportunities/OpportunityLogicHook.php
PHP Code:
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
class OpportunityLogicHook {
function calculateField(&$focus, $event, $arguments) {
$focus->amount = $focus->amountfb1_c + $focus->amoutfb2_c;
}
}
Cheers
Bookmarks