2017-10-05 107 views

回答

0

而不是改變SugarCRM配置文件config.php嘗試改變config_override.php。您還可以使用模塊加載器添加您的自定義配置,在manifest.php文件中應用以下代碼。

$cfg = new Configurator(); 
    // Your custom configuration code 
    $cfg->config['myaddon_setting'] = true; // This will make add-ons setting enable. 
    $cfg->handleOverride(); 

要執行數據庫查詢,請使用以下代碼。

$mymodule = BeanFactory::newBean($module); 
    $db = DBManagerFactory::getInstance(); 
    $query = "SELECT * FROM users WHERE 1"; 
    $result = $db->query($query, true,"Error reading the database"); 

對於邏輯掛鉤點擊Logic Hooks。如果你需要其他的東西,請在評論中寫下。