Announcements
Hi,
I'm trying to build a link from a column in an Entitylist to redirect to a webform from a related entity. The javascript I'm trying to use is based on that posted here, but isn't working for me in the way that I want: https://community.dynamics.com/crm/b/thinkdynamicdodynamic/posts/crm-portals-add-hyperlink-on-custom-attribute-in-entity-list.
The javascript I've put together is as follows:
You have to get it by playing js only, so if you are getting id correctly now it should work fine.
Thanks Mahender - I'd had to change this original js because it was pointing to tr/data-id which wasn't the record GUID I needed. I've actually fixed this now, although the approach is a bit luddite:
var id=$(this).attr("data-value").slice(5,43);
This just brings me back the ID part of the value string/array.
However, if there's something more elegant I'd be grateful to hear it!
Cheers
Ralph
Hi,
I suggest you to use developer tools to check properties of the entitylist and first try this in the console to make sure you are getting id part.
var id=$(this).attr("data-value");
or
var id=$(this).closest('tr').attr("data-id"); //as suggested in the post
Once you got it then test it will the js, don't have access to any demo portal otherwise I could check it.
André Arnaud de Cal...
293,302
Super User 2025 Season 1
Martin Dráb
232,114
Most Valuable Professional
nmaenpaa
101,156
Moderator