如何在Xrm网格中定义隐藏列

时间:2019-03-12 11:56:33

标签: dynamics-crm xrm

有没有办法在xrm网格/视图中包含隐藏的列?

说我已保存查询定义,如:

<savedquery>
  <savedqueryid>{...}</savedqueryid>
  <layoutxml>
    <grid name="resultset" jump="name" select="1" icon="1" preview="1">
      <row name="result" id="entityid">
        <cell name="name" width="200" />
        <cell name="statuscode" width="100" />   
      </row>
    </grid>
  </layoutxml>
  <querytype>0</querytype>
  <fetchxml>
    <fetch version="1.0" output-format="xml-platform" mapping="logical">
      <entity name="entity">
        <attribute name="name" />
        <attribute name="statuscode" />
      </entity>
    </fetch>
  </fetchxml>
</savedquery>

我要做的是通过客户端api访问网格中的列-因为它驱动了功能区逻辑

var allSelectedRows = gridContext.getGrid().getSelectedRows().forEach((row) => {
  // this doesn't work if grid doesn't contain statuscode column
  let status = row.data.entity.attributes.get("statuscode");

});

实际上没有在用户界面中显示该列。

0 个答案:

没有答案