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 :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Disable Change View Option

(0) ShareShare
ReportReport
Posted on by 125

Hi,

Is it possible to disable change view option?

User clicks on add existing button(contact sub-grid on custom entity) and during lookup records i want to restrict user from changing the view.I have tried by making the view selector  Off in sub-grid properties but that's not working.

6661.pastedimage1580930447593v2.png

5287.2020_2D00_02_2D00_05_5F00_1321_5F00_LI.jpg

1803.pastedimage1580930694452v3.png

I have the same question (0)
  • Verified answer
    LeoAlt Profile Picture
    16,341 Moderator on at

    Hi partner,

    The option of  "view selector" in subgrid could only control the view of the subgrid, not in lookup view.

    For example:

    Enable view selector.

    2543.pastedimage1580958605333v1.png

    Disable view selector.

    3010.pastedimage1580958718389v2.png

    If you want to hide the change view ribbon, you could use unsupported JS code to hide it by css.

    5633.pastedimage1580959487778v3.png

    Add the code on the form onload event.

    function subgridCustomization() {
        var cssRules = '';
          cssRules  = 'ul[aria-label="Lookup recently used results"] {display:none!important} ';
          cssRules  = 'button[aria-label="Change View"]  {display:none!important}';
          var styleElement = parent.document.createElement('style');
          styleElement.appendChild(document.createTextNode(cssRules));
          parent.document.getElementsByTagName('head')[0].appendChild(styleElement);
    }

    This method was provided by Alex in this thread.

    https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/373000/how-to-restrict-recent-and-change-view-for-subgrid/986681

    Hope it helps.

    Best Regards,

    Leo

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

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

#1
11manish Profile Picture

11manish 92 Super User 2026 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 50 Super User 2026 Season 2

#3
ParthPatel249 Profile Picture

ParthPatel249 40

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans