Dynamics crm 2011 Fetchxml以获取当前用户作为所有者的活动商机的联系人CRM 2013
目标:创建一个视图,该视图可以显示当前用户拥有的所有联系人,以及具有当前用户拥有的关联opportunity的任何联系人 问题:我对fetchxml或linkentities并没有很好的掌握,即使是在回顾了我可以在谷歌上搜索到的关于它们的内容之后。当我尝试使用fetch语句构建视图时,它不会返回任何内容,因此我假设我构建的视图不正确 以下是我到目前为止所做的声明:Dynamics crm 2011 Fetchxml以获取当前用户作为所有者的活动商机的联系人CRM 2013,dynamics-crm-2011,dynamics-crm,fetch,dynamics-crm-2013,fetchxml,Dynamics Crm 2011,Dynamics Crm,Fetch,Dynamics Crm 2013,Fetchxml,目标:创建一个视图,该视图可以显示当前用户拥有的所有联系人,以及具有当前用户拥有的关联opportunity的任何联系人 问题:我对fetchxml或linkentities并没有很好的掌握,即使是在回顾了我可以在谷歌上搜索到的关于它们的内容之后。当我尝试使用fetch语句构建视图时,它不会返回任何内容,因此我假设我构建的视图不正确 以下是我到目前为止所做的声明: <fetch version='1.0' output-format='xml-platform' mapping='logi
<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='true'>
<entity name='contact'>
//big list of attributes
<order attribute='fullname' descending='false' />
<link-entity name='opportunity' from='customerid' to='contactid' alias='aa'>
<filter type='and'>
<condition attribute='ownerid' operator='eq-userid' />
</filter>
</link-entity>
<filter type='or'>
<condition attribute='ownerid' operator='eq-userid' />
</filter>
</entity>
</fetch>
//属性的大列表
任何提示都将不胜感激,谢谢 我不是FetchXML专家,但我认为这种查询是不可能的 以下是CRM的解释: 相关实体条件或组不能与父项分组 实体条件或组
我不是FetchXML专家,但我认为这个查询是不可能的 以下是CRM的解释: 相关实体条件或组不能与父项分组 实体条件或组
很遗憾,您将无法使用FetchXml构建此查询。解决方法是生成报表并将其嵌入CRM。不幸的是,您无法使用FetchXml生成此查询。解决方法是构建报告并将其嵌入到CRM中。您已经查看了CRM 2011和CRM 2013。在CRM 2011中,这是不可能的。使用CRM 2013,您可以做到这一点
<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='true'>
<entity name='contact'>
<attribute name='fullname' />
<order attribute='fullname' descending='false' />
<link-entity name='opportunity' from='customerid' to='contactid' alias='aa' link-type='outer'>
<attribute name='name' />
</link-entity>
<filter type='or'>
<condition attribute='ownerid' operator='eq-userid' />
<condition entityname='aa' attribute='ownerid' operator='eq-userid' />
</filter>
</entity>
</fetch>
您已经检查了CRM 2011和CRM 2013。在CRM 2011中,这是不可能的。使用CRM 2013,您可以做到这一点
<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='true'>
<entity name='contact'>
<attribute name='fullname' />
<order attribute='fullname' descending='false' />
<link-entity name='opportunity' from='customerid' to='contactid' alias='aa' link-type='outer'>
<attribute name='name' />
</link-entity>
<filter type='or'>
<condition attribute='ownerid' operator='eq-userid' />
<condition entityname='aa' attribute='ownerid' operator='eq-userid' />
</filter>
</entity>
</fetch>
用当前用户Guid替换00000000-0000-0000-0000-000000
。
用当前用户Guid替换00000000-0000-0000-0000-000000000000
。您是刚刚完成一个fetchXml查询?一个全新的查询,还是为了了解我的查询可能有什么问题。不管是哪种方式。您是刚刚完成一个fetchXml查询?一个全新的查询,还是为了了解我的查询可能有什么问题。不管是哪种方式。经过更多的搜索和实验,这基本上也是我得出的结论。这似乎可以归结为链接实体的功能类似于“and”过滤器。我需要它像“或”过滤器一样工作。哦,好吧。经过更多的搜索和实验,这基本上也是我得出的结论。这似乎可以归结为链接实体的功能类似于“and”过滤器。我需要它像“或”过滤器一样工作。哦,好吧。你在建议之前试过你的代码吗?我试过了,但得到了“无效XML”。异常。是的,它在CRM 2013 online上对我很好。2011年无效;您在哪里运行它?在6.0.2.50上成功运行。您测试的在线实例版本是什么?好的,再试一次。关闭fetch语句未显示。现在它可以工作了。这是一个非常有趣的功能,可能会很有用。谢谢在建议之前,您是否尝试过您的代码?我试过了,但得到了“无效XML”。异常。是的,它在CRM 2013 online上对我很好。2011年无效;您在哪里运行它?在6.0.2.50上成功运行。您测试的在线实例版本是什么?好的,再试一次。关闭fetch语句未显示。现在它可以工作了。这是一个非常有趣的功能,可能会很有用。谢谢