Not able to Refresh child table with refresh_field from Method executed from custom button

Following is my Scenirio.

  • I Have Added Custom Button on Delivery Note, which gets activate on form save.
    cur_frm.add_custom_button(__(‘Get Alternative Items’),
    cur_frm.cscript[‘Get Alternative Items’], “icon-exclamation”, “btn-default”);

  • On click of this custom button, control moves to server side, perform some operations and changes the content of child table(Delivery Note Details). I save the form from server side.

  • On callback I try to refresh the child table using refresh_field(“delivery_note_details”).
    But table does not get refresh.

When I manually reload form, I can see that changes, but I want it to be done automatically on callback.

For More Details Please Check following Links

Please Guide…

Thanks and Regards,

Since you are making changes on the server side to an open doc, it is best
to pass the whole doc to server side and get it back after it gets updated.

Here’s an example: