Skip to main content

Notifications

Microsoft Dynamics CRM forum
Suggested answer

How to bind javascript in subgrid?

Posted on by
Hi, I have a requirement there is a Project Entity under that there are few sub grid like Tasks, Estimates etc., If I change any field in Tasks tab then another field in the same tab should be locked for particular security role. I have tried multiple ways then I found a way to do it by JS but don't know whether this is the correct approach or not. Can anyone help me to answer this. Thanks in advance.
  • Suggested answer
    Amit Katariya007 Profile Picture
    Amit Katariya007 7,425 Super User 2024 Season 1 on at
    How to bind javascript in subgrid?
    If you need to lock and unlock fields on a form based on the value of another field and restrict access for certain security roles, JavaScript is a good option. However, if users can update the record through bulk upload or by editing via Advanced Find, JavaScript alone won’t cover these scenarios since it only applies to form interactions.
     
    If form-level control is your only requirement, JavaScript will work well. But if you need to enforce these restrictions regardless of how the record is modified, a server-side plugin is more suitable. The plugin can check permissions and apply field-level security during record updates.
     
     

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

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,818 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,147 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans