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
Thanks a lot it worked like a charm.
in onchange event of subgrid, use web api update to set the new value and then refresh the subgrid
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
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.
Hi Divya,
Refer the link below.
neilparkhurst.com/.../dynamics-365-editable-grids-javascript-example
Hope this helps.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,151 Super User 2024 Season 2
Martin Dráb 229,993 Most Valuable Professional
nmaenpaa 101,156