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 :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

Disabling subgrid in Dynamics CRM CE

(0) ShareShare
ReportReport
Posted on by 121

Still looking a script to disabling subgrid in Dynamics CRM CE. Previously , i wokring for Dynamics CRM v8.2 and using this unsupported javascript to disabling subgrid. So the users unable to double click the subgrid. 

document.getElementById(subgridName   "_span").disabled = "true";

But its seem that those script cannot run on Dynamics CRM CE with editable subgrid. ive been looking in this forum, but still not found the solution.  Is there anybody able to accomplish this ?

I have the same question (0)
  • Suggested answer
    Naveen Ganeshe Profile Picture
    3,397 User Group Leader on at
    RE: Disabling subgrid in Dynamics CRM CE

    Hello,

    I believe you can assign read privileges to that entity for specific users.

    or

    Please take a look at this link: stackoverflow.com/.../cant-disable-field-subgrid-with-javascript

  • FikriHailal Profile Picture
    121 on at
    RE: Disabling subgrid in Dynamics CRM CE

    Hi, im affraid i can't do that. Basically this subgrid enable for all user. But when the record status change from draft to submit. Subgrid became disable. I need to control the subgrid through javascript.

  • Suggested answer
    meelamri Profile Picture
    13,216 User Group Leader on at
    RE: Disabling subgrid in Dynamics CRM CE

    Hi, 

    If I understand your need correctly, you want to disable the editing of records that are in your subgrid. To do this you can disable the control on each cell of your grid. The GridCell object has the method setDisabled which will allow you to disable the control.

    Please refer to the documentation: docs.microsoft.com/.../gridcell

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Disabling subgrid in Dynamics CRM CE

    Hi FikriHailal,

    You can disable subgrid view through disabling editing of all fields.

    function onrowselect(executionContext) {
        var entityObject = executionContext.getFormContext().data.entity;
        entityObject.attributes.forEach(function (attribute, i) {
                var emailControl = attribute.controls.get(0);
                emailControl.setDisabled(true);        
        });
    }

    You can refer following link for more details:

    Dynamics 365 editable sub-grid fields are disabled and not editable - Programmer Sought

    Regards,

    Leah Ju

    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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
#ManoVerse Profile Picture

#ManoVerse 101

#2
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 66 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans