Skip to main content

Notifications

Announcements

No record found.

Service | Customer Service, Contact Center, Fie...
Answered

Portal - How to set hyperlink on primary field in Entity List if not set up as first column

Posted on by 40

Hi,

I would like to put an hyperlink on the primary field on Entity list.

By default, it is possible to set it up with the first column of the entity list but how to move this behavior if I want my primary field is set after the first column ?

I read others topics that works with custom attribute but unfortunately it can't be applied because "data value" doesn't store the guid of the record.

  • Alex519 Profile Picture
    Alex519 40 on at
    RE: Portal - How to set hyperlink on primary field in Entity List if not set up as first column

    Hi Leah,

    Thank you for the detailed steps you provided. It works well.

    Regards,

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Portal - How to set hyperlink on primary field in Entity List if not set up as first column

    Hi Partner,

    Has the problem been solved? Any updates?

    Please click Yes under "Did this answer your question?" to close this thread.

    pastedimage1605866399235v1.png

    Thanks. 

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Portal - How to set hyperlink on primary field in Entity List if not set up as first column

    HI Alex519,

    By default, In Entity List If you enable settings to view Entity List records, It shows hyperlink only on very First Column of Entity List.

    You can refer following steps to make the other Column Value Hyperlink of any Entity List in Portal.

    1.example javascript code:

    $('.entitylist').on("loaded", function () {

        //To make the field/column's value hyperlink

        $("td[data-attribute*='Field's BackEnd Name']").each(function() { 

       // Get guid of record - This will give you the GUID of Current Record (Current Row).

        var GUID = $(this).closest('tr').attr("data-id");

        // Partial URL of webpage where you want to redirect the user.

        var pagewhereToRedirect = "Partial URL of Web Page";

        // Construct the URL

        var redirect = window.location.href + pagewhereToRedirect + "/?id="+ GUID;

        // Make the field value Hyperlink

        var text=$(this).text();

        $(this).html("<a href="+redirect+">"+text+"</a>");

        });

        });

    2.In above code, you just need to change the highlighted value only.

    (1) get ‘Field's SCHEMA NAME or Field's HTML Control Id’.

    Go Settings > Customizations > Customize the system > Entities > Case > Fields.

     pastedimage1605852351857v4.png

    (2) get ‘Web page Partial URL’

    Right Click on Hyperlink and Copy Link Address. The highlighted part is the partial URL of the webpage.

     pastedimage1605852649295v1.png

    3.Add the modifid js code to entity list.

     pastedimage1605851979384v2.png

    4.Test.

    pastedimage1605851948309v1.png

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans