Hello everybody,
I try to get the value of the selected record in subgrid . Here is the code I use, but I get this error:
"Unable to get property 'getData' of undefined or null"
var test = function (){
var selectedRecord = Xrm.Page.getControl("the name of my subgrid").getGrid().getSelectedRows().getAll()[0].getData().getEntity();
var attributes = selectedRecord.getAttributes().getAll();
var attributeValue = attributes.getByName("name").getValue();
alert (attributeValue);
}
I am looking forward to your answers.
Regards