简体   繁体   English

Dynamics CRM - 从子网格创建记录时的 N:N 关系数据/字段/属性映射

[英]Dynamics CRM - N:N relationship data/field/attribute mapping when creating record from subgrid

I'm using Dynamics 365 On-Premise 8.2, having an N:N relationship between entity Case & entity Contact and trying to do mapping between them for a required lookup field "Category", so that when I'm creating NEW Case record from the Case subgrid in Contact form, the lookup field "Category" is pre-filled/pre-populated with Case's Category value.我正在使用 Dynamics 365 On-Premise 8.2,在实体案例和实体联系人之间具有 N:N 关系,并尝试在它们之间为所需的查找字段“类别”进行映射,这样当我创建新案例记录时在联系表单中的案例子网格中,查找字段“类别”已预先填充/预先填充了案例的类别值。 Since it can't be done with data mapping (only applicable to 1:N relationship), I'm looking for a way to do that with custom code, but fail to construct it since I can't think of a way to pull the parent record creating the NEW record.由于无法通过数据映射完成(仅适用于 1:N 关系),因此我正在寻找一种使用自定义代码的方法,但无法构建它,因为我想不出一种拉创建新记录的父记录。 Anyone knows how to pull the parent record when creating new record from N:N subgrid?任何人都知道从 N:N 子网格创建新记录时如何提取父记录? Or any other way to accomplish the N:N attribute mapping purpose?或任何其他方式来完成 N:N 属性映射目的?

Thanks a lot in advance!提前非常感谢!

Read some blogs inspired me to look into how Lead & Account, Contact, Opportunity works and I found Lead having both N:1 & 1:N & N:N relationship with Account & Contact.阅读一些博客启发了我研究 Lead & Account、Contact、Opportunity 的工作原理,我发现 Lead 与 Account & Contact 有 N:1 & 1:N & N:N 关系。 Therefore, I solved it by created another entity B/"Case" lookup field in entity A/"Contact" (which is a N:1 relationship from Contact to Case), simulating the "Originating Lead" field & relationship in the OOB Contact & Account.因此,我通过在实体 A/“联系人”(这是从联系人到案例的 N:1 关系)中创建另一个实体 B/“案例”查找字段来解决它,模拟 OOB 联系人中的“原始潜在客户”字段和关系& 帐户。 Then the mapping works exactly what I want.然后映射完全符合我的要求。 Hope it helps someone in the future希望它在未来对某人有所帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM