我正在使用微软动态Web API https://msdn.microsoft.com/en-us/library/mt607689.aspx将数据写入 Microsoft Dynamics 365 中的实体。当我尝试执行深插入 https://msdn.microsoft.com/en-us/library/gg328090.aspx#Create%20related%20entities%20in%20one%20operation我收到错误
未声明的属性“ccseq_employeeid”,在有效负载中仅具有属性注释,但在有效负载中未找到属性值。在 OData 中,只有声明的导航属性和声明的命名流可以表示为不带值的属性。
为什么我会收到此错误以及如何解决该错误?
JSON
{
"ccseq_importdate" : "2017-05-28T04:00:00Z",
"ccseq_month" : "1",
"ccseq_year" : "2017",
"ccseq_name" : "Test",
"ccseq_status" : "100000000", "ccseq_ccseq_expensetransactionset_ccseq_expensetransaction_ExpenseTransactionSetID" :
[
{
"[email protected] /cdn-cgi/l/email-protection": "/systemusers(6d2fd71b-32d1-dd11-a4f5-001a6449bbe7)",
"[email protected] /cdn-cgi/l/email-protection": "/ccseq_clients(663ebd00-73b9-4faf-90ed-f56bb9c2dc9b)",
"ccseq_navemployeeid" : "11111",
"ccseq_employeefirstname" : "John"
}
]
}
ExpenseTransactionSet
是的父级ExpenseTransaction
意思是ExpenseTransaction
有一个查找ExpenseTransactionSet
. ccseq_ccseq_expensetransactionset_ccseq_expensetransaction_ExpenseTransactionSetID
是一对多的关系。systemuser
and ccseq_clients
是在其中查找的独立实体ExpenseTransaction
.
我还尝试了以下变体"[email protected] /cdn-cgi/l/email-protection"
[email protected] /cdn-cgi/l/email-protection
[email protected] /cdn-cgi/l/email-protection
[email protected] /cdn-cgi/l/email-protection
[email protected] /cdn-cgi/l/email-protection : systemusers()
[email protected] /cdn-cgi/l/email-protection
[email protected] /cdn-cgi/l/email-protection
我见过this https://stackoverflow.com/questions/32761311/create-annotation-to-a-contact-entity-in-microsoft-dynamics-crm-by-api问题和this https://stackoverflow.com/questions/42631164/microsoft-dynamics-web-api问题并尝试了建议的解决方案,但没有成功。