簡體   English   中英

MS Dynamics CRM中的帳戶聯系人關系

[英]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屬性。 這將是EntityReferenceLookup等,並獲取該1:n關系的1側的ID和類型(“account”)。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM