SubGrid checkbox list not updating the selection on ribbon button click

58 Views Asked by At

I have a subgrid lookup displayed as checkbox list, when I unselect an item and click submit(custom button) on ribbon button, it's showing the unchecked item as checked. But the data is saved correctly.

If I try to reload the form on submit, I'm loosing all the error notifications that is suppose to show on submit. I tried using addonload, refreshing the subgrid on load nothing works. Any suggestion how to reload the grid only will be helpful.

Tried all below code:

Xrm.Utility.openEntityForm("customer", cid); 

formContext.data.refresh(save);                                 

formContext.data.entity.addOnSave(refreshForm(formContext));

formContext.getControl("Customer_Subgrid").refresh();
1

There are 1 best solutions below

0
On

Try to replace line

formContext.data.entity.addOnSave(refreshForm(formContext));

with line

formContext.data.entity.addOnSave(refreshForm);