136
Hello All,

As you probably know adding a Custom Fetch into an Editable Grid is not supported by CDS / Dynamics 365. In the old interface this functionality was available only through an unsupported implementation as seen below.

var gridControl = formContext.getControl(GRID_NAME);
var subGrid = window.parent.document.getElementById(GRID_NAME);
var rowCount = gridControl !== null ? gridControl.getGrid().getTotalRecordCount() : 0;

if (subGrid !== null) {

if (gridControl === null) {
setTimeout(function () { //Repeat call initial function for delayed loading of the grid }, 1000);
return;
}

if (subGrid == null || gridControl == null || rowCount == null) {
Xrm.Utility.alertDialog("Grid not found");
return;
}

subGrid["control"].SetParameter("fetchXml", fetchXML);
subGrid["control"].SetParameter("effectiveFetchXml", fetchXML);
subGrid["control"].SetParameter("fetchXmlForFilters", fetchXML);
//subGrid["control"].SetParameter("layoutXml", LayoutXml);
subGrid["control"].Refresh();
}

In the new interface the above solution does not work (which is to be expected as it is unsupported). There is a way to set it in JavaScript but the Grid does not support it and hence will ignore it, as seen below.

var gridControl = formContext.getControl(GRID_NAME);
gridControl.setFilterXml(fetchXML);
gridControl.refresh();

The official statement that it is currently unsupported can be found here:
https://github.com/MicrosoftDocs/dynamics-365-customer-engagement/issues/719

I would like to propose adding the ability the insert a Custom Fetch into the Editable Grid from the SDK as seen in my last example.
Category: General
STATUS DETAILS
Needs Votes

Comments

K

This would be really nice to have. We need it!

Category: General

K

Oh wow, this would really help. It works great already just support it. With the recent UI updates it could help keep grids consistent through the system. We could still use the out of the box grids instead of PCF or old Web resources.

Category: General

K

This would be really useful!

Category: General

K

we need this.

Category: General

K

This feature will be really helpful to reduce the amount of time we have to spend on workarounds. Please add this feature.

Category: General

K

We need this

Category: General

K

We need this feature

Category: General

K

We need it

Category: General

K

We need it

Category: General

K

we need it, the workarounds are too expensive

Category: General

  • 1
  • 2