简体   繁体   English

是否可以在MS Dynamics CRM 2015中创建虚拟实体?

[英]Is it posible to create a virtual entity in MS Dynamics CRM 2015?

the customer entity in MS Dynamics CRM is not a "normal" entity. MS Dynamics CRM中的客户实体不是“普通”实体。 It is a virtual composite entity. 它是一个虚拟的复合实体。 The question is... Is it posible to create a own virtual entity? 问题是...创建自己的虚拟实体是否可行? And if so how? 如果是这样怎么办?

I want to create different contract entities and it would be nice to have just the contractid which can be one of a bunch of different contractids. 我想创建不同的合同实体,最好有一个Contractid,它可以是一堆不同的Contractid中的一个。 So if there exists a xcontract entity and a ycontract entity and a field where I can insert a contractid it is possible to insert a xcontractid or a ycontractid. 因此,如果存在xcontract实体和ycontract实体,以及可以在其中插入Contractid的字段,则可以插入xcontractid或ycontractid。 Just like it is solved with the customerid and the accountid/contactid. 就像用customerid和accountid / contactid解决一样。

Thanks. 谢谢。

I can think of two options that may be able to resolve what you're asking. 我可以想到两个选项,它们可能能够解决您的要求。 I'll make a base assumption first, based on your question to help confine my answer. 我将首先根据您的问题做出基本假设,以帮助限制我的答案。

Assumption: You desire Entity A to have a single relationship to either Entity B or Entity C 假设:您希望实体A与实体B或实体C具有单一关系

Option 1 - Custom Joining Entity 选项1-自定义加入实体

Not sure if this achieves the end result you are looking for, but you could Create Entity D, that has an Entity B and Entity C field, and then create a relationship from Entity A to Entity D. Entity D would be your "Customer" and Entity B & C would be your account and contact respectively. 不知道这样做是否能达到您想要的最终结果,但是您可以创建具有实体B和实体C字段的实体D,然后创建从实体A到实体D的关系。实体D将是您的“客户”和实体B&C分别是您的帐户和联系人。 You'd have to write a few plugins to ensure the relationship is accurate, and to properly update the display name of Entity D, when it changes for the related Entity B or C records. 您必须编写一些插件来确保关系正确,并在实体D或相关记录更改时适当更新实体D的显示名称。

Option 2 - Activity Party 选项2-活动方

Assuming Entities B & C have yet to be created, create them as Custom Activities. 假设尚未创建实体B和C,请将其创建为“自定义活动”。 You can then select them from an activity party list in the client. 然后,您可以从客户端的活动参与者列表中选择它们。 You could also add pre-filters that constrain the activity types that are being queried when the user attempts to lookup an existing record. 您还可以添加预过滤器,以约束用户尝试查找现有记录时要查询的活动类型。

There is no way of doing that in any versions of Microsoft Dynamics CRM. 在任何版本的Microsoft Dynamics CRM中都无法做到这一点。 We all want to have this kind of polymorphic relationships. 我们都希望拥有这种多态关系。 You can vote for this feature on Connect - https://connect.microsoft.com/dynamicssuggestions/Feedback/Details/685374 您可以在Connect上对该功能投票-https: //connect.microsoft.com/dynamicssuggestions/Feedback/Details/685374

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

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