Recently we had a requirement wherein we wanted to see all the child records of a record in a SubGrid .
We had self-referential (hierarchical relationship) enabled for that entity.
Configuring the Sub Grid on the form.

We have also enabled the Editable grid for the Sub Grid.

The JavaScript code
function filterSubGrid()
{
// get the current record's guid
var entityId = Xrm.Page.data.entity.getId();
// refer the subgrid
var testGrid =...










