
Announcements
I have a subgrid (from the contact table) featuring four columns. The initial column is a lookup originating from the account table, while the fourth includes dropdown item controls, such as "view details." Clicking on "view details" opens a new page with the URL that includes the ID and the record's relationship. My goal is to extract each account GUID from the lookup column and append it to each dropdown's hyperlink. This modification will enable me to display a subgrid of the account table on the subsequent page by appending the account to the URL.
/*
This code appends the Organization GUID to the dropdown menu's <a>.
*/
$(document).ready(function () {
$('.entity-grid.subgrid').on('loaded', function () {
$(this)
.children('.view-grid')
.find('tbody tr')
.each(function (i, e) {
var orgId = $(this).find('td[data-attribute="rsp_assignedtoid"]:first').data('value').Id;
var originalHref = $(this).find('td:last a').attr('href');
var newHref = originalHref + '&oid=' + orgId;
$(this).find('td:last a').attr('href', newHref);
});
});
});
I've attempted the provided code and explored alternative implementations, but it doesn't appear to be functioning. I would appreciate any assistance or guidance.