Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum

Hiding Ribbon Button on Home page based on Location

(0) ShareShare
ReportReport
Posted on by 20

Hi All,

I would like to inquire if is it possible to hide the buttons from on Home Page based on Location. We are trying to have a java script to get the location logic and call it in ribbon workbench however we won't be able to see the webresource. Please confirm if is it a crm limitation to hide the buttons from home page ?

Please confirm.

  • Suggested answer
    Kalpavruksh D365 CoE Profile Picture
    Kalpavruksh D365 CoE 2,545 on at
    RE: Hiding Ribbon Button on Home page based on Location
    Hi,
    If you want to get longitude and latitude, please check the following JavaScript:
    You can also get the country of the logged-in user using JavaScript if it is stored in the User record.
     
    Steps to add ribbon buttons is given in the below link:
    neilparkhurst.com/.../
  • RonPeters Profile Picture
    RonPeters 90 on at
    RE: Hiding Ribbon Button on Home page based on Location

    Global Hide Actions

    Clearly, it is important to decide which option to use, but often the quickest and most effective way of clearing up the user interface is through 'Hide Actions'

    1) Find the Tab or Button you would like to hide - some buttons may exist on more than one Ribbon - Form, Home Page and SubGrid - so make sure you have the correct one using the drop-down in the top right of the design surface.

    2) Use the 'Right Click' -> 'Hide'

    pastedimage1566308838995v1.jpeg

    pastedimage1566308838996v2.jpeg

    3) Once you have hidden an item, you will see a red strike-through:

    pastedimage1566308838996v3.jpeg

    pastedimage1566308838996v4.jpeg

    Hiding Groups

    If you want to hide an entire Group, then you simply need to hide each button within it, and the Group will not be rendered. The Ribbon Xml schema actually allows you to apply Hide Actions to groups, however I've found that this can cause JavaScript errors in the UI and so it is worth avoiding.

    UnHiding a Tab or Button

    Once you've hidden a Button or Tab and published and re-loaded, it will no longer appear in the Ribbon Workbench Design Surface. When you re-load the solution, you'll see a message indicating that there is a Hide Action, and the element is not visible until you delete the Hide Action and re-load the solution.

    pastedimage1566308838997v5.jpeg

    To un-hide a ribbon element, you can select the corresponding Hide Action in the Solution Elements -> Hide Actions, and use the left-click menu 'UnHide':

    pastedimage1566308838997v6.png

    Custom Elements that are also hidden

    If you try and hide an element that is already customised in some way (e.g. a Tab that has a custom button/group) the Ribbon Workbench will give you an message similar to the following:

    pastedimage1566308838997v7.gif

    Regards,

    Ron Peters

    Developer | o365CloudExperts

  • GHM Profile Picture
    GHM 20 on at
    RE: Hiding Ribbon Button on Home page based on Location

    Thank you for your help. The reference you provided is possible on form ribbon means when opening a record but not on home page.

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Hiding Ribbon Button on Home page based on Location

    Hi,

    It is possible to hide those buttons. As you already know, you need to use ribbon workbench for this. The ribbon these button will appear is the homepage grid (the first ribbon which loads when you open ribbon workbench). You need to create the enable/disable rule based with the command using javascript.

    Refer this:

    community.dynamics.com/.../how-to-disable-a-crm-2016-ribbon-button-based-on-form-name

    Hope this helps.

  • GHM Profile Picture
    GHM 20 on at
    RE: Hiding Ribbon Button on Home page based on Location

    Hi Ravi,

    Please see attached file.Home-page-ribbon-button.PNG

  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Hiding Ribbon Button on Home page based on Location

    Hi,

    Can you share which home page button you are referring to? Share screenshot if you can please.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,735 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,466 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans