【问题标题】:SugarCRM Account Contact relationship REST APISugarCRM 帐户 联系关系 REST API
【发布时间】:2011-12-15 15:01:09
【问题描述】:

在 SugarCRM 6.0.0 中,我需要通过 REST Web 服务 API 在帐户和联系人之间创建关系。

我在两种方式(帐户 -> 联系人,联系人 -> 帐户)都尝试了这些方法,但均无济于事:

$method = 'set_relationship';
$params = array(
  'module_name' => 'Accounts',
  'module_id' => $accountId,
  'link_field_name' => 'accounts_contacts',
  'related_ids' => array($userId)
);

$method = 'set_entry';
$params = array(
  'module_name' => 'Contacts',
  'name_value_list' => array(
      array('name' => 'id', 'value' => $userId),
      array('name' => 'accounts_contacts', 'value' => $accountId),
    ),
);

大量搜索只给了我这些方法或 SOAP 解决方案。谁能指出我正确的方向?

【问题讨论】:

    标签: php web-services rest sugarcrm


    【解决方案1】:

    这一行关于

    'link_field_name' => 'accounts_contacts',
    

    应该是

    'link_field_name' => 'contacts',
    

    因为链接字段名称是'contacts'(关系名称是'accounts_contacts')。

    【讨论】:

    • 这确实是解决方案。谢谢!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多