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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Editing the Editable Grid via Javascript

(0) ShareShare
ReportReport
Posted on by 1,848

I have an editable grid of my custom entity on Opportunity form. I want to update field (Mark as Complete which is a Two options field) on the grid rows. I want to perform this action onChange of a field on the opportunity form.

Please if anyone can help me with Javascript code?

I find no way to update a field on the grid for all grid rows. Is there any way?

*This post is locked for comments

I have the same question (0)
  • gdas Profile Picture
    50,091 Moderator on at

    In that case how do you decide which record will be update as subgrid may contain more than one record.

    Secondly without selecting any rows how do you get the selected rows ?

    Could you please give more details about your requirement.

  • Suggested answer
    Shahbaaz Ansari Profile Picture
    6,211 on at

    Hi MN.

    You can create a javascript function, on change of your Two option set you can trigger the  javascript and update the values of related entity using sdk.rest check this link,msdn.microsoft.com/.../gg334427(v=crm.7).aspx. an then you can refresh the javascript to see the updated value on subgrid.

    Hope this helps.

    Best Regards,

    Shahbaaz

  • naZir Profile Picture
    850 on at

    You can use the below code as reference.

    You have to pass context parameter

    function EditableFridView(executionContext) {

       debugger;

       var bool = executionContext.getFormContext().data.entity.attributes.getByName("name").getValue()

       if (bool != null)

       {

           executionContext.getFormContext().data.entity.attributes.getByName("telephone1").setValue(bool);

       }

    }

  • MNarmeen Profile Picture
    1,848 on at

    Goutam, I would like to update all the records in the subgrid. It is a mark as complete field in the subgrid. Also the main opportunity has a field mark as final.

    I want to update all the subgrid records (mark as complete) as the main form mark as final is clicked.

  • MNarmeen Profile Picture
    1,848 on at

    Md Ahmed,

    Is there any way i can update all records in a loop in javascript?

  • naZir Profile Picture
    850 on at

    I don't know..Need to check. What exactly is your requirement.

  • Suggested answer
    Preeti Sharma Profile Picture
    2,678 on at

    Hi,

    You can update all related records using Web API methods in javascript.

    Whenever field (Mark As Complete) is changed you can trigger a javascript to update all records related to current record.

    Following link may help you:

    1. community.dynamics.com/.../252888

    To create request you can use CRM Rest Builder Solution.

    Hope this helps:)

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 CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans