[英]Account Contact Relationship in MS Dynamics CRM
如何將聯系人應用於帳戶?
所以我有一個帳戶和一個聯系人
帳戶acc =新帳戶{Name =“Ab ..”,};
聯系我們=新聯系人{Name =“John”,..};
然后
CreateOneToManyRequest createOneToManyRelationshipRequest =
new CreateOneToManyRequest
{
OneToManyRelationship = new OneToManyRelationshipMetadata
{
//What should I put here?
},
Lookup = new LookupAttributeMetadata
{
//And here?
}
};
CreateOneToManyResponse createOneToManyRelationshipResponse =
(CreateOneToManyResponse)_serviceProxy.Execute(
createOneToManyRelationshipRequest);
我是在正確的軌道上嗎? 或者是否有其他方式將聯系人連接到帳戶?
CreateOneToManyRequest
用於在實體(而不是記錄)之間創建新關系,即更改數據庫架構。 我認為這不是你想要做的。
要將特定聯系人記錄附加到帳戶,請設置其parentcustomerid
屬性。 這將是EntityReference
或Lookup
等,並獲取該1:n關系的1側的ID和類型(“account”)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.