【问题标题】:Microsoft Dynamics crm api-Create contact under accountMicrosoft Dynamics crm api-在账户下创建联系人
【发布时间】:2020-02-10 11:21:44
【问题描述】:

尝试使用 api 在 Microsoft Dynamics crm 中创建联系人。

请求地址为https://alliedmodulartemp.api.crm.dynamics.com/api/data/v9.1/contacts

在创建联系人时要设置帐户下的联系人(即)要设置_parentcustomerid_value。

尝试使用以下格式:

URL:https://alliedmodulartemp.api.crm.dynamics.com/api/data/v9.1/contacts(POST)
input:
{
  "firstname":"alrinmyjammy",
 "emailaddress1":"leonmyjamkutty@gmail.com",
 "_parentcustomerid_value@odata.bind": "/accounts(a5f68843-ec4b-ea11-a812-000d3a579ca8)"

 }
input:
{
  "firstname":"alrinmyjammy",
 "emailaddress1":"leonmyjamkutty@gmail.com",
 "parentcustomerid@odata.bind": "/accounts(a5f68843-ec4b-ea11-a812-000d3a579ca8)"

 }

但错误是,

验证输入参数时出错: Microsoft.OData.ODataException:属性“_parentcustomerid_value” 在有效负载中只有属性注释但没有属性 value 被声明为“Edm.Guid”类型。在 OData 中,只有导航 属性和命名流可以表示为没有属性的属性 价值观。

【问题讨论】:

    标签: php api dynamics-crm


    【解决方案1】:

    你的身体应该像下面这样。我刚刚用我的一个 CRM 实例进行了测试,对我来说效果很好。 网址正确https://alliedmodulartemp.api.crm.dynamics.com/api/data/v9.1/contacts

    {
        "firstname": "Test 2 Postman",
        "lastname": "Test 2 Postman",
        "parentcustomerid_account@odata.bind":"/accounts(22B474B7-4F44-E111-8C06-1CC1DEE8BACD)"
    } 
    

    【讨论】:

      猜你喜欢
      • 2015-12-22
      • 1970-01-01
      • 2019-11-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多