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 :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Editable Grid for roles

(0) ShareShare
ReportReport
Posted on by 28
Hi All
 
I would like to setup that some of user can use Editable Grid, and another user cannot use in same form. Can I setup it in Dynamics 365 for Sale?
 
Thanks 
 
I have the same question (0)
  • Suggested answer
    Leah Ju Profile Picture
    Microsoft Employee on at
    Hi partner,
    Roles? Do you mean security roles?
    Maybe you can create two sub-grids in the same form, one is editable gird, another is read-only grid.
    Then you can use js code to show or hide them based on current user's security role.
    1.Check security soles of current user:
     // Get User Roles
        const userRoles = Xrm.Utility.getGlobalContext().userSettings.roles;
    2.Hide or show sub-grid:
    formContext.getControl(‘Subgrid_consultations’).setVisible(false);//Hide Subgrid
    ormContext.getControl(‘Subgrid_consultations’).setVisible(true);//Show Subgrid
    https://dynatecon.com/2022/05/04/show-and-hide-subgrid-based-on-field-value-using-javascript-in-ms-dynamics-365-crm/
    I hope you can verify my answer if it helps you! If you have any questions, please feel free to contact me.
    Regards,
    Leah

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 > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 118 Super User 2026 Season 1

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 46 Most Valuable Professional

#3
NeerajPawar Profile Picture

NeerajPawar 41

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans