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

Notifications

Announcements

No record found.

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

Responsible AI policies

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

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 53 Super User 2025 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 27 Most Valuable Professional

#3
Soundari Profile Picture

Soundari 15

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans