Hi there,
so the file that calls the function is on
sugarcrm/custom/modules/<MyModule>/logic_hooks,php
PHP Code:
<?php
$hook_version = 1;
$hook_array = Array();
// position, file, function
$hook_array['before_save'][] = Array(1,'currencymassupdate', 'modules/<MyModule>/<MyModule>LogicHook.php','<MyModule>LogicHook', 'currencymassupdate');
?>
and the function on the file sugarcrm/modules/<MyModule>/<MyModule>LogicHook.php
PHP Code:
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
class <MyModule>LogicHook {
function currencymassupdate(&$bean, $event, $arguments){
//currency fields for mass update
if($_REQUEST['action'] == 'MassUpdate') {
$bean->valorlancamento = (float)$bean->fetched_row['valorlancamento'];
}
}
}
you should replace <MyModule> for your module's name. In this case valorlancamento is the name of the field i need to update
Bookmarks