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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested Answer

is it possible to show or hide the share button in Model Driven App

(0) ShareShare
ReportReport
Posted on by 15

pastedimage1679978856471v1.png
I was trying to use the ribbon workbench
but this button is not in there for me to edit. 
I was tried ON LOAD event with below code

function hidesharebutton(executionContext) {

    'use strict';   

    //window.top.document.getElementById("collaborationShareButton").style.display='none';   

    window.parent.document.getElementById("collaborationShareButton").style.display='none';

}



but it is giving me below error.

pastedimage1679979389597v2.png

what is the resolution for this issue.

I have the same question (0)
  • Suggested answer
    XM-22040801-0 Profile Picture
    11 on at

    Hello,

    Using the DOM is not supported.

    You can do it with RibbonWorkbench or by using the rights.

    With RibbonWorkbench:

    1. Create a solution, add only the desired entity.

    2. Run RibbonWorkbench and open the solution.

    3. Click on the button (be careful, there is Share and Sharing).

    4. Right-click => Hide

    5. Publish

    With the rights :

    Remove the right to share on the desired entity in the relevant roles. This is the last dot on the right.

  • Suggested answer
    Haig Liu Profile Picture
    Microsoft Employee on at

    Hi Banne.5b3,

    The most suitable solution is to use security roles:

    pastedimage1680145717682v1.png

    System buttons cannot be edited using ribbon workbench or JS.

    If you insist, please refer to this link:

    https://powerusers.microsoft.com/t5/Building-Power-Apps/how-to-hide-share-button-in-a-model-driven-app/td-p/1890331

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 Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
11manish Profile Picture

11manish 36

#2
Mallesh Deshapaga Profile Picture

Mallesh Deshapaga 32

#3
ManoVerse Profile Picture

ManoVerse 30 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans