Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Limitation of editable grid option set add remove options not working

(0) ShareShare
ReportReport
Posted on by 50,091 Moderator

Hello Friends ,

Seems this is  limitation of Dynamics 365 editable grid. I have registered a function  in one of the field onchange event in the editable grid  and making options add , remove from one optionset field in the editable grid but its not working . However I can see all the method is there in the control when I am getting from selected rows .

Here is my code in the onchange event of one text field in the editable grid. Does anyone have any idea or anyone implemented the same .

function OnChangeField() {
    debugger;
    
    //get the selected rows - use the getControl method and pass the grid name.
    selectedRow = Xrm.Page.getControl("Fee").getGrid().getSelectedRows();

    //loop through rows and get the attribute collection
    selectedRow.forEach(function (row, rowIndex) {

        //get the attribute Collection
        attributeColl = row.getData().getEntity().attributes;

        //loop through attribute Collection and do the calculation and set the 
        attributeColl.forEach(function (att, attIndex) {

            switch (att.getName()) {
                case "stu_feetype":
                    //get the value of price
                    if (att.getValue() != null && att.getValue() != 'undefined') {


                        var optionSet = att;
                        var optionSetValues = att.getOptions();
                        optionSet.clearOptions();
                        for (i = 0 ; i < optionSetValues.length ; i++) {
                            if (optionSetValues[i].value == "956560000")
                                optionSet.addOption(optionSetValues[i]);
                            else
                                optionSet.removeOption(optionSetValues[i]);

                        }

                    }
                    break;
            }

        });
    });

}


multieditlimitation.png

*This post is locked for comments

  • Verified answer
    SergiiChvyr Profile Picture
    on at
    RE: Limitation of editable grid option set add remove options not working

    Hi,

    Yes, this issue is still there. Option manipulation methods should be in control, but in grid they appear in attribute. And yes, they do not work still. I see code is actually empty, so this might be an error

    2019_2D00_05_2D00_06-13_5F00_04_5F00_59_2D00_Opportunity_5F00_.png

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
dkrishna Profile Picture

dkrishna 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans