为自定义模块创建bean

内夫

我已经在suitecrm中创建了SLA工作流模块。现在,我想获取SLA工作流模块的所有记录(“ SLA_workflow”-模块名称)。我尝试下面的代码,但没有得到任何记录。

$workflowbean=BeanFactory::newBean('SLA_workflow');
$slabean=BeanFactory::getBean('SLA_workflow');

上面两个都没有给我SLA工作流程模块的记录。

巴列塔

检索单个记录$workflowbean->retrieve($workflowbean_id)要检索记录列表,其复杂一点,因为您必须指定过滤和其他详细信息。

例如,对于“帐户”模块(刚刚在7.11.2上进行了测试),它将是这样的:

      $moduleBean = BeanFactory::getBean("Accounts");
      $where=[" accounts.name like '%t%' "]; //This can be an array of where conditions
      $params['include_custom_fields']=true;
      $query = $moduleBean->create_new_list_query(" ORDER BY accounts.name ", implode(" AND ", $where), "", $params, $show_deleted = 0, '', false, null, $singleSelect = false);
      $offset=0;
      $limit=10;
      $max_per_page=10;
      $res=$moduleBean->process_list_query($query, $offset, $limit, $max_per_page, $where);

那应该使您能够根据您的搜索参数获取bean列表

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章