{"id":933,"date":"2013-02-26T05:59:43","date_gmt":"2013-02-26T05:59:43","guid":{"rendered":"http:\/\/mahenderpal.wordpress.com\/?p=933"},"modified":"2013-02-26T05:59:43","modified_gmt":"2013-02-26T05:59:43","slug":"onrefresh-not-working-anymore-after-upgrading-to-polaris","status":"publish","type":"post","link":"https:\/\/himbap.com\/blog\/?p=933","title":{"rendered":"Onrefresh Not working Anymore after upgrading to Polaris"},"content":{"rendered":"<p>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.<\/p>\n<p><strong>var <strong>ProductSubgrid <\/strong>= document.getElementById(&#8220;opportunityproductsGrid&#8221;);<br \/>\n<\/strong><\/p>\n<p><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <strong>ProductSubgrid<\/strong>.attachEvent(&#8220;onrefresh&#8221;, FunctionName);<\/strong><\/p>\n<p>So I tried to check if someone else is facing this issue and found <a href=\"http:\/\/social.microsoft.com\/Forums\/en\/crmdevelopment\/thread\/688f77f6-0afd-4985-a21c-6eb1f7bea5a2\">this<\/a> thread which helped me to fix this issue, we have to do below changes to make it work in Polaris<\/p>\n<p><strong>var ProductSubgrid = document.getElementById(&#8220;opportunityproductsGrid&#8221;);<\/strong><\/p>\n<p><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <strong>ProductSubgrid<\/strong>.control.add_onRefresh(ReLoadOpportunity);<\/strong><\/p>\n<p>After this it&#8217;s working fine.<\/p>\n<p>Hope it will help somebody !!<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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(&#8220;opportunityproductsGrid&#8221;); \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ProductSubgrid.attachEvent(&#8220;onrefresh&#8221;, FunctionName); So I tried to check if someone else is facing this issue and&#8230; <a href=\"https:\/\/himbap.com\/blog\/?p=933\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[33,142],"_links":{"self":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/933"}],"collection":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=933"}],"version-history":[{"count":0,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/933\/revisions"}],"wp:attachment":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=933"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=933"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=933"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}