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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Remove View-Details me...
Power Pages
Answered

Remove View-Details menu from entity list through javascript

(0) ShareShare
ReportReport
Posted on by 167

I'm trying to remove the View-Details menu item on the entity list through javascript. I've tried the following commands in Javascript. I normally do not have any issue showing/hiding fields but this one seems to be giving me a hard time. I cannot simply remove the table permission on the web roles of the current user because I want to maintain that this certain user role still be able to view the records.

 

$('.details-link').parent().hide();
$('.details-link').hide();
$('.details-link').parent().remove();
$('.details-link').remove();

 

gospa_1-1680217491257.png

 

Categories:
I have the same question (0)
  • Fubar Profile Picture
    8,487 Super User 2026 Season 1 on at

    $('.details-link').hide(); will hide more than what you probably want so if you are not seeing anything being hidden, it will be your code running before the List has rendered (it will render after document.ready), you would need to run your code on the List being loaded (or use a mutationobserver).

  • gng Profile Picture
    167 on at

    I have made sure that I cleared the cache and synchronized Power Pages to make sure my code is up to date and reflecting properly. I have placed $('.details-link').hide(); inside the document ready function. However when I load the UI, it's still not hidden. You mentioned that that piece of code may hide more than what I want. I am currently having trouble getting it to execute and hide stuff for now.

     

    gospa_0-1680236990306.png

    gospa_1-1680237008620.png

     

  • Verified answer
    Fubar Profile Picture
    8,487 Super User 2026 Season 1 on at

    As I mentioned in my post the List loads/renders after document.ready would have triggered.  If you open your Browsers console F12 and let the List load then put the ........hide() in the console you should see it hiding stuff.

     

    But you will need to pick up the List being loaded (or use a mutationobserver which is a bit more complex but lets you make changes as it is loading rather than after it has loaded)

    The following bit of code is from here: https://learn.microsoft.com/en-us/power-apps/maker/portals/configure/add-custom-javascript-list

     

    // this is not a full answer to your question but should 
    // give you enough to run your code on the "loaded"
    
    $(document).ready(function (){
     $(".entitylist.entity-grid").on("loaded", function () {
     $(this).children(".view-grid").find("tr").each(function (){
     // do something with each row
     $(this).css("background-color", "yellow");
     });
     });
    });

     

  • gng Profile Picture
    167 on at

    I see what you meant now.

     

    Your code worked perfectly as well. Thank you!

     

    gospa_0-1680274081743.pnggospa_1-1680274089634.png

     

  • arpitshri Profile Picture
    on at

    Another NO CODE option is: Add a fetch xml that always returns false (any invalid condition that will never return true) under the filter criteria option. By doing this, the dropdown's View Details or Edit buttons will always remain hidden. (as shown below)

     

    arpitshri_0-1694695588538.png

     

    Hope that helps!

    - Arpit (Arpit Power Guide)

  • Manju Gurjar Profile Picture
    8 on at

    Thank you Arpit it helped me

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
rezarizvii Profile Picture

rezarizvii 64

#2
DP_Prabh Profile Picture

DP_Prabh 36

#3
oliver.rodrigues Profile Picture

oliver.rodrigues 30 Most Valuable Professional

Last 30 days Overall leaderboard