Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

Get selected record GUID from OOB Associated subgrid of custom entity CRM 365 online

$
0
0

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

1)  Is there any way to get subgrid name on + New button from both the subgrids ?
2)  Is there any way to get associated view name in JavaScript like a custom subgrid ?
3)  I need condition in JS code to check if it is associated grid or custom grid on +New button
4)  Is there any alternative to this functionality
5)  Need to detect +New button click whether it is from associated grid or custom grid ?
     Please help me

Regards

Absha


Viewing all articles
Browse latest Browse all 79901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>