Onrefresh Not working Anymore after upgrading to Polaris

We started facing issue in one of our organization after it is upgraded to Polaris. In oportunity form we have used attach event to attach onrefresh event to subgrid to refresh opportunity form after doing any modification in line items.

var ProductSubgrid = document.getElementById(“opportunityproductsGrid”);

       ProductSubgrid.attachEvent(“onrefresh”, FunctionName);

So I tried to check if someone else is facing this issue and found this thread which helped me to fix this issue, we have to do below changes to make it work in Polaris

var ProductSubgrid = document.getElementById(“opportunityproductsGrid”);

       ProductSubgrid.control.add_onRefresh(ReLoadOpportunity);

After this it’s working fine.

Hope it will help somebody !!

 

4 thoughts on “Onrefresh Not working Anymore after upgrading to Polaris

Leave a Reply