[英]Dynamics CRM. Fully custom FetchXml in subgrid
I'm making a subgrid on account to show all related contacts by multiple fields. 我正在为一个子网格提供按多个字段显示所有相关联系人的信息。 Here's fetch xml I'm trying to set:
这是我尝试设置的xml:
<fetch mapping="logical">
<entity name="contact">
<attribute name="firstname" />
<filter type="or">
<condition attribute="new_behorde" operator="eq" value="" />
<condition attribute="new_behorde2" operator="eq" value="" />
<condition attribute="new_behorde3" operator="eq" value="" />
</filter>
</entity>
I'm setting this using document.getElementById("contacts").control.SetParameter method. 我使用document.getElementById(“ contacts”)。control.SetParameter方法进行设置。 But if I try to run document.getElementById("contacts").control.refresh(), effective fetch xml becomes:
但是,如果我尝试运行document.getElementById(“ contacts”)。control.refresh(),则有效的xml提取将变为:
<fetch mapping="logical">
<entity name="contact">
<attribute name="firstname" />
<filter type="and">
<condition attribute="new_behorde" operator="eq" value="" />
<filter type="or">
<condition attribute="new_behorde" operator="eq" value="" />
<condition attribute="new_behorde2" operator="eq" value="" />
<condition attribute="new_behorde3" operator="eq" value="" />
</filter>
</filter>
</entity>
This happens because I chose new_behorde as related field in the subgrid. 发生这种情况是因为我在子网格中选择了new_behorde作为相关字段。
So can I somehow avoid adding this extra filter and extra condition? 那么我能以某种方式避免添加此额外的过滤器和额外的条件吗?
When setting up your subgrid in the form editor, select that you want to return all records, not just the ones related to this entity. 在表单编辑器中设置子网格时,选择要返回所有记录,而不仅仅是返回与此实体相关的记录。 Then CRM will leave your FetchXml alone.
然后,CRM将不理会您的FetchXml。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.