web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to disable hyperli...
Power Apps
Answered

How to disable hyperlinks on views and subgrids

(0) ShareShare
ReportReport
Posted on by 311

In a model-driven app, is there a way to disable hyperlinks on views and subgrids that take the user to the lookup table record instead of the primary table record?

Categories:
I have the same question (0)
  • GarethPrisk Profile Picture
    2,828 on at

    There's no quick or supported way to do this. It is possible, but I would instead leverage this existing functionality instead of fighting against it. This is typically a desired "click through" behavior that can be a major benefit of MDA views.

    I can appreciate that users find it irritating until they are used to how this works. It is especially challenging for intersect entities (where the lookups are essential to show how things are related).

     

    A few tips:

    • DO NOT put a Lookup as the first column in a view, if you can help it
      • Instead use the Primary field (prefix_name)
      • Set the name to something automatically, if the records aren't named by users
    • DO set correct expectations for users in training
      • Explain why hyperlinks exist and what lookups to other entities are
      • Instruct them to click into the row's white space to open a record
    • DO consider your MDA theme
      • You can make the lookup field links more obvious
  • tschopp Profile Picture
    311 on at

    @GarethPrisk 

    Thanks for the tips.  I understand where this functionality can be useful once users are accustomed to it.  But there are some cases where our users would never need to click through to the lookup table record.  Since you said "it is possible", I'm curious how that might be done.  Is there a way to access and disable those links using JavaScript or JQuery?

  • Verified answer
    StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    As Gareth mentioned, accessing DOM objects is not supported but here is the article to disable the lookup hyperlink.

     

    https://vishalgrade.com/2018/02/12/how-to-disable-hyperlink-property-of-a-lookup-in-dynamics-crm/

    The same concept we can apply for views.

     

    Another option is to have a text field to store the lookup name. So that you can display it on the views. The drawback is this text field needs to be updated whenever lookup changes.

  • GarethPrisk Profile Picture
    2,828 on at

    @tschopp as @StalinPonnusamy posted, this would be done by unsupported code using the DOM. I can't recommend this, whatsoever. If only because it sets poor expectations for users, and there is no guarantee it will work in all scenarios or long-term.

     

    Since they won't ever need to click through, could you simply set the Primary Field, or a custom text field, to be a friendly display name for the record?

    For example, if it was an Account Contact table, and you had a lookup to Account and Contact, could you set Primary Field via sync workflow to be "{Account Name} | {Contact Name}" or equivalent?

    Then you simply show just the Primary field, or custom text field, in your views and the users won't be able to click-through.

     

    In other places, they may need to/want to click-through and they'll then be able to and know how/when.

  • tschopp Profile Picture
    311 on at

    @GarethPrisk - I've used that idea on another table and it works well.  But for the table I'm working on now, the primary name field is an auto number with values that are meaningless to the users.  So I could add it to the subgrid, but not optimal.

     

    @StalinPonnusamy - Thanks for the link.  I agree that that does not look like a good idea and will hold off on doing that until the users buy off on the risks.  Your idea of adding a separate text field is interesting though.  We'll keep that under consideration.

  • GarethPrisk Profile Picture
    2,828 on at

    @tschopp I'd add another text field that is meaningful to the users and display that.

    Always good to drive positive UX, where the user's get the best contextual info, and has the least cognitive load.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard