简体   繁体   English

动态CRM。 在subgrid中完全自定义FetchXml

[英]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.

相关问题 FetchXML查询在子网格中返回的Dynamics CRM 2015中的活动记录-主题超链接打开新的活动 - Activity records in Dynamics CRM 2015 returned in subgrid by FetchXML query - Subject hyperlink opens new Activity 设置子网格的fetchXML时,无法读取Dynamics CRM中未定义的属性“ SetParameter” - Cannot read property 'SetParameter' of undefined in Dynamics CRM while setting up fetchXML of a subgrid 动力学crm。 从javascript问题启动对话框处理向导 - dynamics crm. launch dialog process wizard from javascript issue dynamics crm在关联的视图上获取子网格的名称 - dynamics crm get name of subgrid on associated view 如何以Dynamics CRM形式调整子网格的高度? - How to resize the height of the subgrid in dynamics crm forms? CRM 2011子网格-自定义表单 - CRM 2011 subgrid - custom form 在 Dynamics 365 CRM 统一界面中重新加载/刷新子网格时重新加载表单 - Reload Form on reload/refresh of subgrid in Dynamics 365 CRM Unified Interface 根据条件禁用 Dynamics CRM 可编辑子网格中的列 - Disable column in Dynamics CRM editable subgrid based on a condition MS Dynamics CRM 2013子网格与其添加按钮重叠 - Ms dynamics crm 2013 subgrid overlap with its add button Dynamics CRM 2011获取子网格选定的单元格值 - Dynamics crm 2011 get subgrid selected cell value
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM