需要帮助才能进行计算。我有以下代码
crm/custom/modules/Leads/logic_hooks.php
<?php
// Do not store anything in this file that is not part of the array or the hook version. This file will
// be automatically rebuilt in the future.
$hook_version = 1;
$hook_array = Array();
// position, file, function
$hook_array['before_save'] = Array(1,'Calculating field', 'custom/modules/Leads/custom_comm.php','calculate_field_class', 'calculate_field_function');
$hook_array['before_save'] = Array();
$hook_array['before_save'][] = Array(1, 'Leads push feed', 'modules/Leads/SugarFeeds/LeadFeed.php','LeadFeed', 'pushFeed');
$hook_array['after_retrieve'] = Array();
$hook_array['after_retrieve'] = Array(1, 'calculating commission', 'custom/modules/Leads/custom_comm.php','calculate_field_class', 'calculate_field_function');
$hook_array['after_ui_frame'] = Array();
?>
crm/custom/modules/Leads/custom_comm.php
<?php
Class calculate_field_class
{
function calculate_field_function()
{
$bean->commission_c = $bean->vehicle_gross_c / 2;
}
}
die("I got called")
?>
这些根本不起作用。有什么建议么。我已经访问了所有论坛并搜索了网络