【问题标题】:SugarCRM - create CommentLog with API v10SugarCRM - 使用 API v10 创建 CommentLog
【发布时间】:2021-10-20 19:39:58
【问题描述】:

我正在寻找一种使用SugarCRM API 在CommentLog 中创建条目的方法。我第一次尝试使用 PHP 和 rest-php-client,但不幸的是找不到写或读 CommentLog 的方法。

通过 Postman,我可以验证自己、使用令牌、read/create/update 潜在客户或帐户。不幸的是,例如,我无法在CommentLog 中输入一个案例。

我使用的端点是$url/rest/v10/CommentLog/$CaseId (POST)$url/rest/v10/CommentLog (GET),没有任何成功的展位。

我在/rest/v10/help 上看到了一个addComment 函数,但我不知道它是如何工作的。

【问题讨论】:

  • 如果我没记错的话,CommentLog 就像一个关系,所以一种方法可能是像POST $url/rest/v10/Cases/$CaseId/link/commentlog_link 这样创建一个新的 CommentLog 记录,该记录链接到指定的案例。 (检查 /help 的有效载荷格式)。不过,我不确定链接名称“commentlog_link”;也许我以后可以自己调查或测试。
  • 我认为commentlog_link 是一个端点。但我不知道,身体应该是什么样子。 { "description": { "comment": "Full text of the note" } } 它不起作用。

标签: php postman sugarcrm


【解决方案1】:

试试这样的;

PUT rest/v10/Bugs/01114102-319a-11ec-b680-acde48001122(

主体:

{
  "commentlog_link": {
    "create": [{"entry": "The comment goes here", 
    "_link": "commentlog_link", 
    "deleted": false}], 
    "add": [], 
    "delete": []
  }
}

使用 Sugar 11.0.2 版验证

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-01-15
    • 2010-09-30
    相关资源
    最近更新 更多