B
ByronB
Guest
Hi, I have 2 objects: Account 1:M TPA I have 2 separate relationships from Accounts to TPA, there are 2 TPA list views within Accounts. Each list view should launch its own quick create, I have looked but cant see anything built in to select the quick create being launched? I have tried to override the onclick function being called on the quick create button but it seems very clunky and was wondering if there is a better was of achieving this? script $(document).ready(function() { var onclickFunction = $("#rbi_S_54473 table tbody tr td div div div span div a").attr("onclick"); var commaIndex = onclickFunction.indexOf(",", returnTextIndex); // get the comma after the first comma var returnTextIndex = onclickFunction.indexOf(","); // get the first comma onclickFunction = onclickFunction.replaceBetween(returnTextIndex + 2, commaIndex, 157180); // 157180 is the quick create ID of the Customer TPA $("#rbi_S_54473 table tbody tr td div div div span div a").attr("onclick", onclickFunction); }); String.prototype.replaceBetween = function (start, end, what) { return this.substring(0, start) + what + this.substring(end); } /script
Continue reading...
Continue reading...