aya*_*tha 2 php api dynamics-crm
尝试使用 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)"
}
Run Code Online (Sandbox Code Playgroud)
但错误是,
验证输入参数时出错:Microsoft.OData.ODataException:属性“_parentcustomerid_value”在有效负载中仅具有属性注释,但没有将属性值声明为“Edm.Guid”类型。在 OData 中,只有导航属性和命名流可以表示为没有值的属性。
小智 5
你的身体应该像下面这样。我刚刚用我的一个 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)"
}
Run Code Online (Sandbox Code Playgroud)