Customizing a Model-Driven App in Dynamics 365 or Power Apps can be a complex task, especially when it comes to hiding the Share button. In this article, we'll explore four methods to achieve this, providing a step-by-step guide for each approach.

Why Hide the Share Button?

Method 1. Ribbon Workbench Alternative

Method 2. Security Roles Configuration

Method 3. Manipulating Solution XML

Steps to follow

Method 4. JavaScript Approach

JavaScript Approach

function hideShareButtononForm() {
    for (var i = 0; i < 100; i++) {
        var shareButton = window.top.document.getElementById("collaborationShareButton_" + i);
        if (shareButton) {
            shareButton.style.display = 'none';
            return;
        }
    }
}

Dynamic function

Additional Tips and Considerations

Conclusion

Hiding the Share button in a Model-Driven App requires careful planning and execution. By following the step-by-step guides outlined in this article, you can successfully customize your app to meet your organization's specific requirements. Remember to test, validate, and maintain your customizations to ensure a seamless user experience.

Thank you for reading! We hope this article helped you successfully hide the Share button in your Model-Driven App. If you have any questions, feedback, or suggestions, please leave a comment below. We'd love to hear from you!