Onrefresh is not working anymore in 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 !!

Ebook Download
View all
Learn
View all