Sugarcrm 如何在没有关系的详细视图页面上添加自定义子面板
如何在没有关系的详细视图页面上添加自定义子面板Sugarcrm 如何在没有关系的详细视图页面上添加自定义子面板,sugarcrm,Sugarcrm,如何在没有关系的详细视图页面上添加自定义子面板 例如:我想在Leads Detail View页面上添加Accounts子面板。这可能会让您在获得正确答案方面有优势,但您应该知道这相当复杂 您可以通过向director添加文件custom/Extension/modules/Leads/Ext/Layout/name\u this\u file\u anythis.php来创建自定义dashlet 文件的内容应该是向数组$layout_defs['Leads']['subpanel_setup'
例如:我想在Leads Detail View页面上添加Accounts子面板。这可能会让您在获得正确答案方面有优势,但您应该知道这相当复杂 您可以通过向director添加文件custom/Extension/modules/Leads/Ext/Layout/name\u this\u file\u anythis.php来创建自定义dashlet 文件的内容应该是向数组$layout_defs['Leads']['subpanel_setup']添加新元素的内容。您可能可以从现有模块目录中的layout defs文件中找到要添加的内容 如果您需要创建一个自定义子面板,这需要更多的工作,并且需要创建一个名为“getSubpanelQueryParts($params)”的函数,该函数查询所需的记录并返回一个查询部分数组,并将一个元素添加到subpanel\u setup/custom\u dashlet数组中,该数组的内容如下:
'collection_list' => array(
'calls_opportunities' => array(
'subpanel_name' => 'ForAccounts',
'module' => 'Calls',
'get_subpanel_data' => 'function:getSubpanelQueryParts', // here custom method defined
'generate_select' => true, // to build custom SQL query
'function_parameters' => array(
'import_function_file' => 'custom/application/Ext/Utils/custom_calls_opportunities.php',
'return_as_array' => 'true'
), // to get data for subpanel collection item
),
),