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

Community site session details

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

Restrict entity access for the User added through Access Team Template

(0) ShareShare
ReportReport
Posted on by 67

We have a requirement to assign both Technical and Business users to each application in order to complete technical and business data. It is important that both types of users are not allowed to edit each other's data. To fulfill this requirement, we used an Access Team Template that allows us to assign specific users with access to the application. Our process involved:

  1. Creating an "App Read Only Role" with edit access to all related entities.
  2. Assigning the "App Read Only Role" as the default role.
  3. Allowing the App Admin to add users to either the Technical or Business Access Team for a specific application.

However, we have encountered an issue where Business users are able to add data to the Subgrid on the Technical page. This is problematic because only Technical users are allowed to edit the value of the Subgrid on the Technical page. We need to ensure that non-technical users are not able to add existing data to the Subgrid.

how we can hide the 'Add Existing..' button for the Subgrid on the technical page for non technial users. 

I have the same question (0)
  • Suggested answer
    Sayen Zhang Profile Picture
    on at
    RE: Restrict entity access for the User added through Access Team Template

    Hi SivaR,

    Hope you are well.

    Here are the steps to hide the 'Add Existing...' button for the Subgrid on the technical page for non-technical users.

    1. Download Ribbon Workbench: Develop 1 Ltd | Ribbon Workbench for Dynamics 365 & Dynamics CRM

    2. Select the environment that you want to hide the 'Add Existing...' button for the Subgrid.

    3. Go to Advanced Settings > Solutions > Import > Choose the file we download.

    4. Find non-technician's security role GUID and then enter in js code to hide 'Add Existing...' button.

    pastedimage1683789836960v2.png

    5. Go to Advanced Settings > Customizations > Customize the system > Web Resource > create a new Web Resource

    function hideButtons(){
    var value = true;
        var basicuserGuid = "70110B17-CCE0-ED11-A7C6-000D3A35619A";
        var userRoles = Xrm.Utility.getGlobalContext().userSettings.securityRoles;
        for (var i = 0; i < userRoles.length; i++) {
           if (userRoles[i].toUpperCase() == basicuserGuid.toUpperCase()){
              value = false;
              break;
           }
        }
       return value;
    }

    pastedimage1683789972874v3.png

    6. Create a new solution and add form that you want to hide the button.

    7. Go to Advanced Settings > Solutions > Click Ribbon Workbench

    pastedimage1683787041511v1.png

    8. Click 'Add Existing...' button and create an enable rule.

    pastedimage1683790279668v5.png

    9. Save and Publish.

    You can also refer to this link: Hide show button on security role using JavaScript and ribbon workbench Dynamics 366 or Dataverse | Softchief Learn

    Best Regards,

    Sayen Zhang

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 70

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 25 Super User 2025 Season 2

#3
mk1329 Profile Picture

mk1329 16

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans