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

Announcements

News and Announcements icon
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 71

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
    Microsoft Employee on at

    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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 51 Super User 2026 Season 1

#2
Nagaraju_Matta Profile Picture

Nagaraju_Matta 50

#3
James White Profile Picture

James White 19

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans