Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - General Discussions
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:
  • Manju Gurjar Profile Picture
    8 on at
    Re: Remove View-Details menu from entity list through javascript

    Thank you Arpit it helped me

  • arpitshri Profile Picture
    on at
    Re: Remove View-Details menu from entity list through javascript

    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)

  • gng Profile Picture
    167 on at
    Re: Remove View-Details menu from entity list through javascript

    I see what you meant now.

     

    Your code worked perfectly as well. Thank you!

     

    gospa_0-1680274081743.pnggospa_1-1680274089634.png

     

  • Verified answer
    Fubar Profile Picture
    7,960 Super User 2025 Season 1 on at
    Re: Remove View-Details menu from entity list through javascript

    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
    Re: Remove View-Details menu from entity list through javascript

    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

     

  • Fubar Profile Picture
    7,960 Super User 2025 Season 1 on at
    Re: Remove View-Details menu from entity list through javascript

    $('.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).

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >