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

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

How I can remove "See all records" in subgrid menu

(0) ShareShare
ReportReport
Posted on by 5

Hello,

I would like to get help to hide or delete an option in the menu (here highlighted) of a subgrid in a form on Dynamics365.

Could you please guide me?

I have the same question (0)
  • Suggested answer
    XM-22040801-0 Profile Picture
    11 on at
    RE: How I can remove "See all records" in subgrid menu

    Hi,

    Can you try this: www.dynamicsforcrm.com/.../

  • Verified answer
    Sayen Zhang Profile Picture
    on at
    RE: How I can remove "See all records" in subgrid menu

    Hi Rafio, 

    I'm afraid it is not available for now to hide See all records button in subgrid directly.

    However, we can replace the normal subgrid in the reference panel.

    Here are the steps:

    1. We can go to Settings > Customization > Customize the System > Entity > Select an entity.

    2. Open the form you want to add the reference panel, click the Insert tab on the top > Select Section > Reference Panel.

    pastedimage1684914769734v1.png

    3. Save and publish, after that See all records button will be hided in the subgrid. 

    It's noticed that a form can only have one reference panel. 

    You can also refer to this link: Dynamics 365: Reference Panel – Dynamics 365 Talk (d365goddess.com)

    Best Regards,

    Sayen Zhang

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

  • Expertopinionsa12 Profile Picture
    51 on at
    RE: How I can remove "See all records" in subgrid menu

    Hi, Rafio 

    It might sound challenging but trust me its not. To remove the "See all records" option from the subgrid menu in Dynamics 365, you will need to use JavaScript code to customize the form. Here's a step-by-step guide to achieve this:

    Open the form customization page in Dynamics 365. You can do this by navigating to Settings > Customizations > Customize the System.

    Find the form that contains the subgrid you want to modify and open it for editing.

    Switch to the "Form" editor and select the subgrid control you want to modify.

    In the Properties window, locate the "Event Handlers" section and click on "Add Row."

    In the new row, select the "Event" as "OnLoad" and enter a unique function name in the "Function" field, such as "HideSeeAllRecords."

    Save and publish the form customization.

    Now, navigate to the "Customize the System" page again and open the "Web Resources" section.

    Create a new web resource of type "JScript" and give it a unique name, such as "HideSeeAllRecords.js".

    In the web resource editor, paste the following JavaScript code:

    function HideSeeAllRecords() {
        // Get the subgrid control
        var subgrid = Xrm.Page.getControl("your_subgrid_name");
    
        // Hide the "See all records" option from the subgrid menu
        subgrid.removeOnLoad(function () {
            var menuItems = subgrid.getMenu().Items;
            for (var i = 0; i < menuItems.getLength(); i  ) {
                if (menuItems.get(i).getLabel() === "See all records") {
                    menuItems.remove(menuItems.get(i));
                    break;
                }
            }
        });
    }
    

    Make sure to replace "your_subgrid_name" with the actual name of your subgrid control. You can find the name by inspecting the subgrid element on the form customization page.

    1. Save and publish the web resource.

    2. Go back to the form customization page and open the form for editing again.

    3. In the "Event Handlers" section of the subgrid control, set the "Library" to the web resource you created ("HideSeeAllRecords.js") and the "Function" to the function name you entered ("HideSeeAllRecords").

    4. Save and publish the form customization.

    Once you have completed these steps, the "See all records" option should be removed from the subgrid menu when the form loads. If that didn't help you can sonsult an expert of Dynamics 365. You can ask me anything regarding this. 

  • Verified answer
    XM-22040801-0 Profile Picture
    11 on at
    RE: How I can remove "See all records" in subgrid menu

     Rafio,

    Don't try to do what it says by Expertopinionsa12, its a Chat GPT response with wrong content. Probably created to advertise his site.

    1. getMenu() doesn't exist in a Grid Control.

    2. removeOnLoad() removes an onLoad event handler, it doesn't add it.

  • Rafio Profile Picture
    5 on at
    RE: How I can remove "See all records" in subgrid menu

     Xavier Monin ,

    Thank you very much for your advice and saving time

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 83 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 57 Most Valuable Professional

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 52 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans