Magento 1.9 Extensions – Uncaught ReferenceError: massactionJsObject is Not Defined

extensionsmagento-1.9

I am adding new logic to Affiliate module from MageStore.
I want add MassAction for enabling/disabling coupons code in accounts. But when I add method _prepareMassaction, I have error when try disable coupon:

Uncaught ReferenceError: couponGrid_massactionJsObject is not defined is not defined

Best Answer

Add below in Grid block of your module where you are facing the issue.

 protected function getAdditionalJavascript() {
       return 'window.couponGrid_massactionJsObject = couponGrid_massactionJsObject;';
//'window.{gridId}_massactionJsObject = {gridId}_massactionJsObject;';
    }
Related Topic