
Hello Friends ,
Seems this is limitation of Dynamics 365 editable grid. I have registered a function in one of the field onchange event in the editable grid and making options add , remove from one optionset field in the editable grid but its not working . However I can see all the method is there in the control when I am getting from selected rows .
Here is my code in the onchange event of one text field in the editable grid. Does anyone have any idea or anyone implemented the same .
function OnChangeField() {
debugger;
//get the selected rows - use the getControl method and pass the grid name.
selectedRow = Xrm.Page.getControl("Fee").getGrid().getSelectedRows();
//loop through rows and get the attribute collection
selectedRow.forEach(function (row, rowIndex) {
//get the attribute Collection
attributeColl = row.getData().getEntity().attributes;
//loop through attribute Collection and do the calculation and set the
attributeColl.forEach(function (att, attIndex) {
switch (att.getName()) {
case "stu_feetype":
//get the value of price
if (att.getValue() != null && att.getValue() != 'undefined') {
var optionSet = att;
var optionSetValues = att.getOptions();
optionSet.clearOptions();
for (i = 0 ; i < optionSetValues.length ; i++) {
if (optionSetValues[i].value == "956560000")
optionSet.addOption(optionSetValues[i]);
else
optionSet.removeOption(optionSetValues[i]);
}
}
break;
}
});
});
}
*This post is locked for comments
I have the same question (0)Hi,
Yes, this issue is still there. Option manipulation methods should be in control, but in grid they appear in attribute. And yes, they do not work still. I see code is actually empty, so this might be an error