Hi All,
We have 1 custom subgrid on main form of the entity and it shows all the active records of related entity. I have customize the + New button on subgrid and passing GUID of the selected record(row) to the custom HTML Page (+ New button opens custom HTML popup).
var selectedRows = formContext.getControl("subgridname").getGrid().getSelectedRows();
if (selectedRows.getLength() < 1) {
alert('no record selected');
}
else {
selectedRows.forEach(function (selectedRow, i) {
var entityGuid = selectedRow.getData().getEntity().getId().slice(1, -1);
}
This code is working fine for custom grid added by me on to the form BUT, we have OOB associated subgrid and +New button is same on both the grids(OOB)
When I click on +New on associated subgrid it checks custom subgrid "subgridname".
So my questions are
Is there any way to get subgrid name on + New button from both the subgrids ?
Is there any way to get associated view name in JavaScript like a custom subgrid ?
I need condition in JS code to check if it is associated grid or custom grid on +New button
Is there any alternative to this functionality
Need to detect +New button click whether it is from associated grid or custom grid ?
Please help me
Regards
Absha