Показать сообщение отдельно
Старый 15.12.2017, 03:21   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
crmtipoftheday: Tip #1044: Display lookups as hyperlinks in portal entity list
Источник: https://crmtipoftheday.com/1044/disp...l-entity-list/
==============

Entity lists in the Dynamics 365 portals do not have any special handling for the lookups – they just render the display names. Fair enough, after all, how is the rendering code supposed to know what page to link to?

If you are comfortable with liquid in portals then the task is relatively easy. Just use the entity list advanced sample and modify it to render lookups as hyperlinks. (If you find that someone butchered a copy-pasting of Adxstudio documentation, go to the nicely formatted source while it’s still available).

If you prefer standard entity list rendered by one of the built-in templates, then a bit of JQuery magic will do the job. Use the sample script as a starting point and just wrap the content of the lookup column using tag. For example, the following code will convert any quote lookup it comes across in the entity list into a link to “/quote/?id=” page.

$(document).ready(function (){ $(".entitylist.entity-grid").on("loaded", function () { $(this).children(".view-grid").find("td[data-attribute='quote']").each(function(){ $(this).wrapInner("
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.