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

MSCRM editable grid save issue

(0) ShareShare
ReportReport
Posted on by 55

I am coming across one issue while working with CRM editable subgrids.
All i want to do is save editable subgrid data on Form submit rather than seperate grid save option.
But not able to find any supported way for that.
Can you please help me here?
Please find beow is the link i went through which has description of subgrid functionality but it says it is not possible and i am not able to trigger the save functionality of editable subgrid.
www.itaintboring.com/.../dynamics-365-is-it-a-bug-or-a-feature
The only event which we can trigger is subgrid change on which i tried to assign data to column but it remains unsaved.

function SaveSubGrid(eContext)
{
var nameAttr = eContext.getEventSource();
var attrParent = nameAttr.getParent();
var InstructionFieldChield = nameAttr.getValue();
var InstructionFieldParent = InstructionFieldChield;
nameAttr.setValue(InstructionFieldParent)
Xrm.Page.data.entity.save();
attrParent.attributes.get("aga_anwendungshinweis").setValue(InstructionFieldParent[0].name);
}

*This post is locked for comments

  • Suggested answer
    Nithya Gopinath Profile Picture
    17,078 on at

    Hi Divya,

    Refer the link below.

    neilparkhurst.com/.../dynamics-365-editable-grids-javascript-example

    Hope this helps.

  • Suggested answer
    Community Member Profile Picture
    on at

    If you want to save data in a subgrid on parent form save, i suggest you use web api's update on parent form save and then refresh the subgrid.

  • Divya Bharti Profile Picture
    55 on at

    Hi i have added code on onchange event of subgrid to setvalue of column but the problem is on setvalue it just displays value in column but on page refresh it discard changes. The main problem is crm subgrids are not exposing its save method to users and i need to bypass it

  • Verified answer
    Community Member Profile Picture
    on at

    in onchange event of subgrid, use web api update to set the new value and then refresh the subgrid

  • Suggested answer
    Divya Bharti Profile Picture
    55 on at

    Thanks a lot it worked like a charm.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans