{"id":284518,"date":"2021-03-05T12:42:02","date_gmt":"2021-03-05T12:42:02","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=284518"},"modified":"2026-04-17T12:56:22","modified_gmt":"2026-04-17T12:56:22","slug":"magento-development-15-massaction","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/magento-development-15-massaction\/","title":{"rendered":"Magento 2 Development 18: MassAction"},"content":{"rendered":"\n<p>The MassAction allows us to perform an operation on multiple items of the grid. You may have seen mass actions on the product grid, which allows us to delete multiple products at once. <\/p>\n\n\n\n<p>We\u2019ll explore in this blog how to add Mass Action functionality in Magento 2 admin grid using UI components for handling multiple records at once.<\/p>\n\n\n\n<p>A <a href=\"https:\/\/webkul.com\/magento-development\/\">Magento development company<\/a> like Webkul provides robust solutions to implement efficient bulk actions and optimize admin grid performance in Magento 2.<br><br> First, we will create a MassAction to delete multiple blogs at once. We need to edit the ui component file <em>view\/adminhtml\/ui_component\/blogmanager_blog_listing.xml<\/em><\/p>\n\n\n\n<p>Updated code for <em>view\/adminhtml\/ui_component\/blogmanager_blog_listing.xml<\/em> file<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;\n&lt;listing xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;urn:magento:module:Magento_Ui:etc\/ui_configuration.xsd&quot;&gt;\n    &lt;argument name=&quot;data&quot; xsi:type=&quot;array&quot;&gt;\n        &lt;item name=&quot;js_config&quot; xsi:type=&quot;array&quot;&gt;\n            &lt;item name=&quot;provider&quot; xsi:type=&quot;string&quot;&gt;blogmanager_blog_listing.blogmanager_blog_listing_data_source&lt;\/item&gt;\n            &lt;item name=&quot;deps&quot; xsi:type=&quot;string&quot;&gt;blogmanager_blog_listing.blogmanager_blog_listing_data_source&lt;\/item&gt;\n        &lt;\/item&gt;\n        &lt;item name=&quot;spinner&quot; xsi:type=&quot;string&quot;&gt;blogmanager_blog_columns&lt;\/item&gt;\n    &lt;\/argument&gt;\n    &lt;dataSource name=&quot;blogmanager_blog_listing_data_source&quot;&gt;\n        &lt;argument name=&quot;dataProvider&quot; xsi:type=&quot;configurableObject&quot;&gt;\n            &lt;argument name=&quot;class&quot; xsi:type=&quot;string&quot;&gt;Magento\\Framework\\View\\Element\\UiComponent\\DataProvider\\DataProvider&lt;\/argument&gt;\n            &lt;argument name=&quot;name&quot; xsi:type=&quot;string&quot;&gt;blogmanager_blog_listing_data_source&lt;\/argument&gt;\n            &lt;argument name=&quot;primaryFieldName&quot; xsi:type=&quot;string&quot;&gt;entity_id&lt;\/argument&gt;\n            &lt;argument name=&quot;requestFieldName&quot; xsi:type=&quot;string&quot;&gt;entity_id&lt;\/argument&gt;\n            &lt;argument name=&quot;data&quot; xsi:type=&quot;array&quot;&gt;\n                &lt;item name=&quot;config&quot; xsi:type=&quot;array&quot;&gt;\n                &lt;item name=&quot;update_url&quot; xsi:type=&quot;url&quot; path=&quot;mui\/index\/render&quot;\/&gt;\n                &lt;item name=&quot;storageConfig&quot; xsi:type=&quot;array&quot;&gt;\n                    &lt;item name=&quot;indexField&quot; xsi:type=&quot;string&quot;&gt;entity_id&lt;\/item&gt;\n                &lt;\/item&gt;\n                &lt;\/item&gt;\n            &lt;\/argument&gt;\n        &lt;\/argument&gt;\n        &lt;argument name=&quot;data&quot; xsi:type=&quot;array&quot;&gt;\n            &lt;item name=&quot;js_config&quot; xsi:type=&quot;array&quot;&gt;\n                &lt;item name=&quot;component&quot; xsi:type=&quot;string&quot;&gt;Magento_Ui\/js\/grid\/provider&lt;\/item&gt;\n            &lt;\/item&gt;\n        &lt;\/argument&gt;\n    &lt;\/dataSource&gt;\n    &lt;listingToolbar name=&quot;listing_top&quot;&gt;\n        &lt;massaction name=&quot;listing_massaction&quot;&gt;\n            &lt;argument name=&quot;data&quot; xsi:type=&quot;array&quot;&gt;\n                &lt;item name=&quot;data&quot; xsi:type=&quot;array&quot;&gt;\n                &lt;item name=&quot;selectProvider&quot; xsi:type=&quot;string&quot;&gt;blogmanager_blog_listing.blogmanager_blog_listing.blogmanager_blog_columns.ids&lt;\/item&gt;\n                &lt;item name=&quot;displayArea&quot; xsi:type=&quot;string&quot;&gt;bottom&lt;\/item&gt;\n                &lt;item name=&quot;indexField&quot; xsi:type=&quot;string&quot;&gt;entity_id&lt;\/item&gt;\n                &lt;\/item&gt;\n            &lt;\/argument&gt;\n            &lt;action name=&quot;delete&quot;&gt;\n                &lt;argument name=&quot;data&quot; xsi:type=&quot;array&quot;&gt;\n                &lt;item name=&quot;config&quot; xsi:type=&quot;array&quot;&gt;\n                    &lt;item name=&quot;type&quot; xsi:type=&quot;string&quot;&gt;delete&lt;\/item&gt;\n                    &lt;item name=&quot;label&quot; xsi:type=&quot;string&quot; translate=&quot;true&quot;&gt;Delete&lt;\/item&gt;\n                    &lt;item name=&quot;url&quot; xsi:type=&quot;url&quot; path=&quot;blog\/manage\/massDelete&quot;\/&gt;\n                    &lt;item name=&quot;confirm&quot; xsi:type=&quot;array&quot;&gt;\n                        &lt;item name=&quot;title&quot; xsi:type=&quot;string&quot; translate=&quot;true&quot;&gt;Delete Blogs?&lt;\/item&gt;\n                        &lt;item name=&quot;message&quot; xsi:type=&quot;string&quot; translate=&quot;true&quot;&gt;Are you sure you want to delete the selected blogs?&lt;\/item&gt;\n                    &lt;\/item&gt;\n                &lt;\/item&gt;\n                &lt;\/argument&gt;\n            &lt;\/action&gt;\n        &lt;\/massaction&gt;\n        &lt;bookmark name=&quot;bookmarks&quot;\/&gt;\n        &lt;columnsControls name=&quot;columns_controls&quot;\/&gt;\n        &lt;filters name=&quot;listing_filters&quot;&gt;\n                &lt;argument name=&quot;data&quot; xsi:type=&quot;array&quot;&gt;\n                    &lt;item name=&quot;config&quot; xsi:type=&quot;array&quot;&gt;\n                        &lt;item name=&quot;templates&quot; xsi:type=&quot;array&quot;&gt;\n                            &lt;item name=&quot;filters&quot; xsi:type=&quot;array&quot;&gt;\n                                &lt;item name=&quot;select&quot; xsi:type=&quot;array&quot;&gt;\n                                    &lt;item name=&quot;component&quot; xsi:type=&quot;string&quot;&gt;Magento_Ui\/js\/form\/element\/ui-select&lt;\/item&gt;\n                                    &lt;item name=&quot;template&quot; xsi:type=&quot;string&quot;&gt;ui\/grid\/filters\/elements\/ui-select&lt;\/item&gt;\n                                &lt;\/item&gt;\n                            &lt;\/item&gt;\n                        &lt;\/item&gt;\n                    &lt;\/item&gt;\n                &lt;\/argument&gt;\n        &lt;\/filters&gt;\n        &lt;paging name=&quot;listing_paging&quot;\/&gt;\n    &lt;\/listingToolbar&gt;\n    &lt;columns name=&quot;blogmanager_blog_columns&quot;&gt;\n        &lt;selectionsColumn name=&quot;ids&quot;&gt;\n            &lt;argument name=&quot;data&quot; xsi:type=&quot;array&quot;&gt;\n                &lt;item name=&quot;config&quot; xsi:type=&quot;array&quot;&gt;\n                    &lt;item name=&quot;indexField&quot; xsi:type=&quot;string&quot;&gt;entity_id&lt;\/item&gt;\n                &lt;\/item&gt;\n            &lt;\/argument&gt;\n        &lt;\/selectionsColumn&gt;\n        &lt;column name=&quot;entity_id&quot;&gt;\n            &lt;settings&gt;\n                &lt;filter&gt;textRange&lt;\/filter&gt;\n                &lt;label translate=&quot;true&quot;&gt;ID&lt;\/label&gt;\n                &lt;resizeDefaultWidth&gt;25&lt;\/resizeDefaultWidth&gt;\n            &lt;\/settings&gt;\n        &lt;\/column&gt;\n        &lt;column name=&quot;user_name&quot;&gt;\n            &lt;settings&gt;\n                &lt;filter&gt;text&lt;\/filter&gt;\n                &lt;label translate=&quot;true&quot;&gt;User&lt;\/label&gt;\n            &lt;\/settings&gt;\n        &lt;\/column&gt;\n        &lt;column name=&quot;title&quot;&gt;\n            &lt;settings&gt;\n                &lt;filter&gt;text&lt;\/filter&gt;\n                &lt;label translate=&quot;true&quot;&gt;Title&lt;\/label&gt;\n            &lt;\/settings&gt;\n        &lt;\/column&gt;\n        &lt;column name=&quot;content&quot; class=&quot;Webkul\\BlogManager\\Ui\\Component\\Listing\\Columns\\Content&quot;&gt;\n            &lt;settings&gt;\n                &lt;filter&gt;false&lt;\/filter&gt;\n                &lt;sortable&gt;false&lt;\/sortable&gt;\n                &lt;label translate=&quot;true&quot;&gt;Content&lt;\/label&gt;\n            &lt;\/settings&gt;\n        &lt;\/column&gt;\n        &lt;column name=&quot;status&quot; component=&quot;Magento_Ui\/js\/grid\/columns\/select&quot;&gt;\n            &lt;settings&gt;\n                &lt;options class=&quot;Webkul\\BlogManager\\Model\\Blog\\Status&quot;\/&gt;\n                &lt;dataType&gt;select&lt;\/dataType&gt;\n                &lt;filter&gt;select&lt;\/filter&gt;\n                &lt;sortable&gt;false&lt;\/sortable&gt;\n                &lt;label translate=&quot;true&quot;&gt;Status&lt;\/label&gt;\n            &lt;\/settings&gt;\n        &lt;\/column&gt;\n        &lt;column name=&quot;updated_at&quot; component=&quot;Magento_Ui\/js\/grid\/columns\/date&quot;&gt;\n            &lt;settings&gt;\n                &lt;filter&gt;dateRange&lt;\/filter&gt;\n                &lt;dataType&gt;date&lt;\/dataType&gt;\n                &lt;label translate=&quot;true&quot;&gt;Updated&lt;\/label&gt;\n            &lt;\/settings&gt;\n        &lt;\/column&gt;\n        &lt;column name=&quot;created_at&quot; component=&quot;Magento_Ui\/js\/grid\/columns\/date&quot;&gt;\n            &lt;settings&gt;\n                &lt;filter&gt;dateRange&lt;\/filter&gt;\n                &lt;dataType&gt;date&lt;\/dataType&gt;\n                &lt;label translate=&quot;true&quot;&gt;Created&lt;\/label&gt;\n            &lt;\/settings&gt;\n        &lt;\/column&gt;\n    &lt;\/columns&gt;\n&lt;\/listing&gt;<\/pre>\n\n\n\n<p>Here we have added the <em>selectionsColumn<\/em> tag inside the <em>columns<\/em> tag. It will show the checkbox column to select the rows.<\/p>\n\n\n\n<p>And inside the <em>listingToolbar<\/em> tag, we have added massaction tag which will be used to manage the mass-action dropdown. <\/p>\n\n\n\n<p>To add the mass-action action, we have used the action tag, where we have specified the label, URL for the mass-action, confirmation message, etc.<\/p>\n\n\n\n<p>Now let&#8217;s create the action file for the mass-delete url, <em>Controller\/Adminhtml\/Manage\/MassDelete.php<\/em><\/p>\n\n\n\n<p>Code for <em>Controller\/Adminhtml\/Manage\/MassDelete.php<\/em> file<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\nnamespace Webkul\\BlogManager\\Controller\\Adminhtml\\Manage;\n\nuse Magento\\Backend\\App\\Action;\nuse Magento\\Backend\\App\\Action\\Context;\nuse Magento\\Framework\\Controller\\ResultFactory;\nuse Magento\\Ui\\Component\\MassAction\\Filter;\nuse Webkul\\BlogManager\\Model\\ResourceModel\\Blog\\CollectionFactory;\n\nclass MassDelete extends Action\n{\n    \/**\n     * @var Webkul\\BlogManager\\Model\\ResourceModel\\Blog\\CollectionFactory\n     *\/\n    protected $collectionFactory;\n\n    \/**\n     * @var Magento\\Ui\\Component\\MassAction\\Filter\n     *\/\n    protected $filter;\n\n    \/**\n     * Dependency Initilization\n     *\n     * @param Context $context\n     * @param Filter $filter\n     * @param CollectionFactory $collectionFactory\n     *\/\n    public function __construct(\n        Context $context,\n        Filter $filter,\n        CollectionFactory $collectionFactory\n    ) {\n        $this-&gt;filter = $filter;\n        $this-&gt;collectionFactory = $collectionFactory;\n        parent::__construct($context);\n    }\n\n    \/**\n     * Provides content\n     *\n     * @return \\Magento\\Framework\\View\\Result\\Page\n     *\/\n    public function execute()\n    {\n        try {\n            $collection = $this-&gt;filter-&gt;getCollection($this-&gt;collectionFactory-&gt;create());\n\n            $count = 0;\n            foreach ($collection as $model) {\n                $model-&gt;delete();\n                $count++;\n            }\n            $this-&gt;messageManager-&gt;addSuccess(__(&#039;A total of %1 blog(s) have been deleted.&#039;, $count));\n        } catch (\\Exception $e) {\n            $this-&gt;messageManager-&gt;addError(__($e-&gt;getMessage()));\n        }\n        return $this-&gt;resultFactory-&gt;create(ResultFactory::TYPE_REDIRECT)-&gt;setPath(&#039;*\/*\/index&#039;);\n    }\n\n    \/**\n     * Check Autherization\n     *\n     * @return boolean\n     *\/\n    public function _isAllowed()\n    {\n        return $this-&gt;_authorization-&gt;isAllowed(&#039;Webkul_BlogManager::delete&#039;);\n    }\n}<\/pre>\n\n\n\n<p>Let&#8217;s see what this line is doing,<br>$this->filter->getCollection($this->collectionFactory->create()); <br>With $this->collectionFactory->create(), we are getting the whole blog collection. And we are passing it in the <em>getCollection<\/em> method of mass-action&#8217;s filter class. <\/p>\n\n\n\n<p>So it will return the collection of all the rows which we selected while performing this action. And we are iterating through each model and deleting them one by one.<\/p>\n\n\n\n<p>There are a few other things new here, which are not limited to the mass-action. <br><strong>__(&#8216;A total of %1 blog(s) have been deleted.&#8217;, $count)<\/strong> &#8211; the <strong>%1<\/strong> will get replaced with <strong>$count<\/strong><br>Similarly, we can pass multiple variables and format strings.<\/p>\n\n\n\n<p><strong>-&gt;setPath(&#8216;*\/*\/index&#8217;)<\/strong> &#8211; here <strong>*<\/strong> means replace this component with current value. So it will replace <em>frontName<\/em> and <em>controllerName<\/em> with current values which will be <em>blog <\/em>and <em>manage<\/em> respectively. <\/p>\n\n\n\n<p>Please ignore the _isAllowed method we will discuss it when we create ACL as mentioned earlier.<\/p>\n\n\n\n<p>Now you should get a similar result as below,<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"800\" height=\"341\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/03\/ezgif.com-gif-maker-2.gif\" alt=\"ezgif.com-gif-maker-2\" class=\"wp-image-284527\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>PS: The selection column might come at the end as the last column. That&#8217;s because the bookmark has been saved in Magento. So we can delete that bookmark by running <br>delete from ui_bookmark where namespace=&#8221;blogmanager_blog_listing&#8221;;<br>SQL query.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">MassActions Tree<\/h3>\n\n\n\n<p>Now let&#8217;s another mass-action to allow the admin to change the status of the blogs. Once again we have to edit the ui component file <em><em>view\/adminhtml\/ui_component\/blogmanager_blog_listing.xml<\/em><\/em><\/p>\n\n\n\n<p>Updated code for <em><em>view\/adminhtml\/ui_component\/blogmanager_blog_listing.xml<\/em><\/em> file<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;\n&lt;listing xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;urn:magento:module:Magento_Ui:etc\/ui_configuration.xsd&quot;&gt;\n    &lt;argument name=&quot;data&quot; xsi:type=&quot;array&quot;&gt;\n        &lt;item name=&quot;js_config&quot; xsi:type=&quot;array&quot;&gt;\n            &lt;item name=&quot;provider&quot; xsi:type=&quot;string&quot;&gt;blogmanager_blog_listing.blogmanager_blog_listing_data_source&lt;\/item&gt;\n            &lt;item name=&quot;deps&quot; xsi:type=&quot;string&quot;&gt;blogmanager_blog_listing.blogmanager_blog_listing_data_source&lt;\/item&gt;\n        &lt;\/item&gt;\n        &lt;item name=&quot;spinner&quot; xsi:type=&quot;string&quot;&gt;blogmanager_blog_columns&lt;\/item&gt;\n    &lt;\/argument&gt;\n    &lt;dataSource name=&quot;blogmanager_blog_listing_data_source&quot;&gt;\n        &lt;argument name=&quot;dataProvider&quot; xsi:type=&quot;configurableObject&quot;&gt;\n            &lt;argument name=&quot;class&quot; xsi:type=&quot;string&quot;&gt;Magento\\Framework\\View\\Element\\UiComponent\\DataProvider\\DataProvider&lt;\/argument&gt;\n            &lt;argument name=&quot;name&quot; xsi:type=&quot;string&quot;&gt;blogmanager_blog_listing_data_source&lt;\/argument&gt;\n            &lt;argument name=&quot;primaryFieldName&quot; xsi:type=&quot;string&quot;&gt;entity_id&lt;\/argument&gt;\n            &lt;argument name=&quot;requestFieldName&quot; xsi:type=&quot;string&quot;&gt;entity_id&lt;\/argument&gt;\n            &lt;argument name=&quot;data&quot; xsi:type=&quot;array&quot;&gt;\n                &lt;item name=&quot;config&quot; xsi:type=&quot;array&quot;&gt;\n                &lt;item name=&quot;update_url&quot; xsi:type=&quot;url&quot; path=&quot;mui\/index\/render&quot;\/&gt;\n                &lt;item name=&quot;storageConfig&quot; xsi:type=&quot;array&quot;&gt;\n                    &lt;item name=&quot;indexField&quot; xsi:type=&quot;string&quot;&gt;entity_id&lt;\/item&gt;\n                &lt;\/item&gt;\n                &lt;\/item&gt;\n            &lt;\/argument&gt;\n        &lt;\/argument&gt;\n        &lt;argument name=&quot;data&quot; xsi:type=&quot;array&quot;&gt;\n            &lt;item name=&quot;js_config&quot; xsi:type=&quot;array&quot;&gt;\n                &lt;item name=&quot;component&quot; xsi:type=&quot;string&quot;&gt;Magento_Ui\/js\/grid\/provider&lt;\/item&gt;\n            &lt;\/item&gt;\n        &lt;\/argument&gt;\n    &lt;\/dataSource&gt;\n    &lt;listingToolbar name=&quot;listing_top&quot;&gt;\n        &lt;massaction name=&quot;listing_massaction&quot; component=&quot;Magento_Ui\/js\/grid\/tree-massactions&quot;&gt;\n            &lt;argument name=&quot;data&quot; xsi:type=&quot;array&quot;&gt;\n                &lt;item name=&quot;data&quot; xsi:type=&quot;array&quot;&gt;\n                &lt;item name=&quot;selectProvider&quot; xsi:type=&quot;string&quot;&gt;blogmanager_blog_listing.blogmanager_blog_listing.blogmanager_blog_columns.ids&lt;\/item&gt;\n                &lt;item name=&quot;displayArea&quot; xsi:type=&quot;string&quot;&gt;bottom&lt;\/item&gt;\n                &lt;item name=&quot;indexField&quot; xsi:type=&quot;string&quot;&gt;entity_id&lt;\/item&gt;\n                &lt;\/item&gt;\n            &lt;\/argument&gt;\n            &lt;action name=&quot;delete&quot;&gt;\n                &lt;argument name=&quot;data&quot; xsi:type=&quot;array&quot;&gt;\n                &lt;item name=&quot;config&quot; xsi:type=&quot;array&quot;&gt;\n                    &lt;item name=&quot;type&quot; xsi:type=&quot;string&quot;&gt;delete&lt;\/item&gt;\n                    &lt;item name=&quot;label&quot; xsi:type=&quot;string&quot; translate=&quot;true&quot;&gt;Delete&lt;\/item&gt;\n                    &lt;item name=&quot;url&quot; xsi:type=&quot;url&quot; path=&quot;blog\/manage\/massDelete&quot;\/&gt;\n                    &lt;item name=&quot;confirm&quot; xsi:type=&quot;array&quot;&gt;\n                        &lt;item name=&quot;title&quot; xsi:type=&quot;string&quot; translate=&quot;true&quot;&gt;Delete Blogs?&lt;\/item&gt;\n                        &lt;item name=&quot;message&quot; xsi:type=&quot;string&quot; translate=&quot;true&quot;&gt;Are you sure you want to delete the selected blogs?&lt;\/item&gt;\n                    &lt;\/item&gt;\n                &lt;\/item&gt;\n                &lt;\/argument&gt;\n            &lt;\/action&gt;\n            &lt;action name=&quot;status&quot;&gt;\n                &lt;settings&gt;\n                    &lt;type&gt;status&lt;\/type&gt;\n                    &lt;label translate=&quot;true&quot;&gt;Change status&lt;\/label&gt;\n                    &lt;actions&gt;\n                        &lt;action name=&quot;0&quot;&gt;\n                            &lt;type&gt;enable&lt;\/type&gt;\n                            &lt;label translate=&quot;true&quot;&gt;Enable&lt;\/label&gt;\n                            &lt;url path=&quot;blog\/manage\/massStatus&quot;&gt;\n                                &lt;param name=&quot;status&quot;&gt;1&lt;\/param&gt;\n                            &lt;\/url&gt;\n                        &lt;\/action&gt;\n                        &lt;action name=&quot;1&quot;&gt;\n                            &lt;type&gt;disable&lt;\/type&gt;\n                            &lt;label translate=&quot;true&quot;&gt;Disable&lt;\/label&gt;\n                            &lt;url path=&quot;blog\/manage\/massStatus&quot;&gt;\n                                &lt;param name=&quot;status&quot;&gt;0&lt;\/param&gt;\n                            &lt;\/url&gt;\n                        &lt;\/action&gt;\n                    &lt;\/actions&gt;\n                &lt;\/settings&gt;\n            &lt;\/action&gt;\n        &lt;\/massaction&gt;\n        &lt;bookmark name=&quot;bookmarks&quot;\/&gt;\n        &lt;columnsControls name=&quot;columns_controls&quot;\/&gt;\n        &lt;filters name=&quot;listing_filters&quot;&gt;\n                &lt;argument name=&quot;data&quot; xsi:type=&quot;array&quot;&gt;\n                    &lt;item name=&quot;config&quot; xsi:type=&quot;array&quot;&gt;\n                        &lt;item name=&quot;templates&quot; xsi:type=&quot;array&quot;&gt;\n                            &lt;item name=&quot;filters&quot; xsi:type=&quot;array&quot;&gt;\n                                &lt;item name=&quot;select&quot; xsi:type=&quot;array&quot;&gt;\n                                    &lt;item name=&quot;component&quot; xsi:type=&quot;string&quot;&gt;Magento_Ui\/js\/form\/element\/ui-select&lt;\/item&gt;\n                                    &lt;item name=&quot;template&quot; xsi:type=&quot;string&quot;&gt;ui\/grid\/filters\/elements\/ui-select&lt;\/item&gt;\n                                &lt;\/item&gt;\n                            &lt;\/item&gt;\n                        &lt;\/item&gt;\n                    &lt;\/item&gt;\n                &lt;\/argument&gt;\n        &lt;\/filters&gt;\n        &lt;paging name=&quot;listing_paging&quot;\/&gt;\n    &lt;\/listingToolbar&gt;\n    &lt;columns name=&quot;blogmanager_blog_columns&quot;&gt;\n        &lt;selectionsColumn name=&quot;ids&quot;&gt;\n            &lt;argument name=&quot;data&quot; xsi:type=&quot;array&quot;&gt;\n                &lt;item name=&quot;config&quot; xsi:type=&quot;array&quot;&gt;\n                    &lt;item name=&quot;indexField&quot; xsi:type=&quot;string&quot;&gt;entity_id&lt;\/item&gt;\n                &lt;\/item&gt;\n            &lt;\/argument&gt;\n        &lt;\/selectionsColumn&gt;\n        &lt;column name=&quot;entity_id&quot;&gt;\n            &lt;settings&gt;\n                &lt;filter&gt;textRange&lt;\/filter&gt;\n                &lt;label translate=&quot;true&quot;&gt;ID&lt;\/label&gt;\n                &lt;resizeDefaultWidth&gt;25&lt;\/resizeDefaultWidth&gt;\n            &lt;\/settings&gt;\n        &lt;\/column&gt;\n        &lt;column name=&quot;user_name&quot;&gt;\n            &lt;settings&gt;\n                &lt;filter&gt;text&lt;\/filter&gt;\n                &lt;label translate=&quot;true&quot;&gt;User&lt;\/label&gt;\n            &lt;\/settings&gt;\n        &lt;\/column&gt;\n        &lt;column name=&quot;title&quot;&gt;\n            &lt;settings&gt;\n                &lt;filter&gt;text&lt;\/filter&gt;\n                &lt;label translate=&quot;true&quot;&gt;Title&lt;\/label&gt;\n            &lt;\/settings&gt;\n        &lt;\/column&gt;\n        &lt;column name=&quot;content&quot; class=&quot;Webkul\\BlogManager\\Ui\\Component\\Listing\\Columns\\Content&quot;&gt;\n            &lt;settings&gt;\n                &lt;filter&gt;false&lt;\/filter&gt;\n                &lt;sortable&gt;false&lt;\/sortable&gt;\n                &lt;label translate=&quot;true&quot;&gt;Content&lt;\/label&gt;\n            &lt;\/settings&gt;\n        &lt;\/column&gt;\n        &lt;column name=&quot;status&quot; component=&quot;Magento_Ui\/js\/grid\/columns\/select&quot;&gt;\n            &lt;settings&gt;\n                &lt;options class=&quot;Webkul\\BlogManager\\Model\\Blog\\Status&quot;\/&gt;\n                &lt;dataType&gt;select&lt;\/dataType&gt;\n                &lt;filter&gt;select&lt;\/filter&gt;\n                &lt;sortable&gt;false&lt;\/sortable&gt;\n                &lt;label translate=&quot;true&quot;&gt;Status&lt;\/label&gt;\n            &lt;\/settings&gt;\n        &lt;\/column&gt;\n        &lt;column name=&quot;updated_at&quot; component=&quot;Magento_Ui\/js\/grid\/columns\/date&quot;&gt;\n            &lt;settings&gt;\n                &lt;filter&gt;dateRange&lt;\/filter&gt;\n                &lt;dataType&gt;date&lt;\/dataType&gt;\n                &lt;label translate=&quot;true&quot;&gt;Updated&lt;\/label&gt;\n            &lt;\/settings&gt;\n        &lt;\/column&gt;\n        &lt;column name=&quot;created_at&quot; component=&quot;Magento_Ui\/js\/grid\/columns\/date&quot;&gt;\n            &lt;settings&gt;\n                &lt;filter&gt;dateRange&lt;\/filter&gt;\n                &lt;dataType&gt;date&lt;\/dataType&gt;\n                &lt;label translate=&quot;true&quot;&gt;Created&lt;\/label&gt;\n            &lt;\/settings&gt;\n        &lt;\/column&gt;\n    &lt;\/columns&gt;\n&lt;\/listing&gt;<\/pre>\n\n\n\n<p>We have added one more action tag in the massaction tag.  And in that action tag, we have added two sub-actions whose URLs are the same but we have passed the <em><strong>status<\/strong><\/em> param with different values.<\/p>\n\n\n\n<p>Since it has a sub-action structure, so we need to add the component attribute in <em><strong>massaction<\/strong><\/em> tag to use <em>tree-massactions<\/em> component.<\/p>\n\n\n\n<p>Now let&#8217;s create the action file as <em>Controller\/Adminhtml\/Manage\/MassStatus.php<\/em><\/p>\n\n\n\n<p>Code for <em>Controller\/Adminhtml\/Manage\/MassStatus.php<\/em> file<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\nnamespace Webkul\\BlogManager\\Controller\\Adminhtml\\Manage;\n\nuse Magento\\Backend\\App\\Action;\nuse Magento\\Backend\\App\\Action\\Context;\nuse Magento\\Framework\\Controller\\ResultFactory;\nuse Magento\\Ui\\Component\\MassAction\\Filter;\nuse Webkul\\BlogManager\\Model\\ResourceModel\\Blog\\CollectionFactory;\n\nclass MassStatus extends Action\n{\n    \/**\n     * @var Webkul\\BlogManager\\Model\\ResourceModel\\Blog\\CollectionFactory\n     *\/\n    protected $collectionFactory;\n\n    \/**\n     * @var Magento\\Ui\\Component\\MassAction\\Filter\n     *\/\n    protected $filter;\n\n    \/**\n     * Dependency Initilization\n     *\n     * @param Context $context\n     * @param Filter $filter\n     * @param CollectionFactory $collectionFactory\n     *\/\n    public function __construct(\n        Context $context,\n        Filter $filter,\n        CollectionFactory $collectionFactory\n    ) {\n        $this-&gt;filter = $filter;\n        $this-&gt;collectionFactory = $collectionFactory;\n        parent::__construct($context);\n    }\n\n    \/**\n     * Provides content\n     *\n     * @return \\Magento\\Framework\\View\\Result\\Page\n     *\/\n    public function execute()\n    {\n        try {\n            $collection = $this-&gt;filter-&gt;getCollection($this-&gt;collectionFactory-&gt;create());\n            $status = $this-&gt;getRequest()-&gt;getParam(&#039;status&#039;);\n            $statusLabel = $status ? &quot;enabled&quot; : &quot;disabled&quot;;\n            $count = 0;\n            foreach ($collection as $model) {\n                $model-&gt;setStatus($status);\n                $model-&gt;save();\n                $count++;\n            }\n            $this-&gt;messageManager-&gt;addSuccess(__(&#039;A total of %1 blog(s) have been %2.&#039;, $count, $statusLabel));\n        } catch (\\Exception $e) {\n            $this-&gt;messageManager-&gt;addError(__($e-&gt;getMessage()));\n        }\n        return $this-&gt;resultFactory-&gt;create(ResultFactory::TYPE_REDIRECT)-&gt;setPath(&#039;*\/*\/index&#039;);\n    }\n\n    \/**\n     * Check Autherization\n     *\n     * @return boolean\n     *\/\n    public function _isAllowed()\n    {\n        return $this-&gt;_authorization-&gt;isAllowed(&#039;Webkul_BlogManager::edit&#039;);\n    }\n}<\/pre>\n\n\n\n<p>Here we are doing similar things as we did earlier. We are iterating through each selected blog and setting the status as the value passed in the param. We set this param-value in the ui component.<\/p>\n\n\n\n<p>Now you will see the change status mass-action as below,<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"437\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/03\/2021-03-05_17-47-1200x437.png\" alt=\"2021-03-05_17-47\" class=\"wp-image-284529\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/03\/2021-03-05_17-47-1200x437.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/03\/2021-03-05_17-47-300x109.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/03\/2021-03-05_17-47-250x91.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/03\/2021-03-05_17-47-768x279.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/03\/2021-03-05_17-47-1536x559.png 1536w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/03\/2021-03-05_17-47.png 1806w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p><br>Folder Structure,<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"319\" height=\"373\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/03\/2021-03-05_18-02.png\" alt=\"2021-03-05_18-02\" class=\"wp-image-284530\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/03\/2021-03-05_18-02.png 319w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/03\/2021-03-05_18-02-257x300.png 257w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/03\/2021-03-05_18-02-213x249.png 213w\" sizes=\"(max-width: 319px) 100vw, 319px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p><br><\/p>\n\n\n\n<p>Next Blog -&gt; <a href=\"https:\/\/webkul.com\/blog\/magento-development-16-action-column\/\">Magento 2 Development 19: Action Column<\/a><\/p>\n\n\n\n<p>Previous Blog -&gt; <a href=\"https:\/\/webkul.com\/blog\/magento-development-14-more-about-admin-grid\/\" target=\"_blank\" rel=\"noreferrer noopener\">Magento 2 Development 17: More aboutAdmin Grid<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The MassAction allows us to perform an operation on multiple items of the grid. You may have seen mass actions on the product grid, which allows us to delete multiple products at once. We\u2019ll explore in this blog how to add Mass Action functionality in Magento 2 admin grid using UI components for handling multiple <a href=\"https:\/\/webkul.com\/blog\/magento-development-15-massaction\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":201,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9121],"tags":[2056,2460],"class_list":["post-284518","post","type-post","status-publish","format-standard","hentry","category-magento-2","tag-magento","tag-magento-2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Magento 2 Mass Action in Admin Grid:<\/title>\n<meta name=\"description\" content=\"This guide explains the step-by-step process to configure mass actions like delete in admin panel, improving efficiency and bulk data management.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/magento-development-15-massaction\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Magento 2 Mass Action in Admin Grid:\" \/>\n<meta property=\"og:description\" content=\"This guide explains the step-by-step process to configure mass actions like delete in admin panel, improving efficiency and bulk data management.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/magento-development-15-massaction\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-05T12:42:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-17T12:56:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2021\/03\/ezgif.com-gif-maker-2.gif\" \/>\n<meta name=\"author\" content=\"Sanjay Chouhan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sanjay Chouhan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/magento-development-15-massaction\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/magento-development-15-massaction\/\"},\"author\":{\"name\":\"Sanjay Chouhan\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/645580979f637b0e355deea21bd07462\"},\"headline\":\"Magento 2 Development 18: MassAction\",\"datePublished\":\"2021-03-05T12:42:02+00:00\",\"dateModified\":\"2026-04-17T12:56:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/magento-development-15-massaction\/\"},\"wordCount\":603,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/magento-development-15-massaction\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2021\/03\/ezgif.com-gif-maker-2.gif\",\"keywords\":[\"magento\",\"Magento 2\"],\"articleSection\":[\"Magento 2\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/magento-development-15-massaction\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/magento-development-15-massaction\/\",\"url\":\"https:\/\/webkul.com\/blog\/magento-development-15-massaction\/\",\"name\":\"Magento 2 Mass Action in Admin Grid:\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/magento-development-15-massaction\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/magento-development-15-massaction\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2021\/03\/ezgif.com-gif-maker-2.gif\",\"datePublished\":\"2021-03-05T12:42:02+00:00\",\"dateModified\":\"2026-04-17T12:56:22+00:00\",\"description\":\"This guide explains the step-by-step process to configure mass actions like delete in admin panel, improving efficiency and bulk data management.\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/magento-development-15-massaction\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/magento-development-15-massaction\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/magento-development-15-massaction\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/03\/ezgif.com-gif-maker-2.gif\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/03\/ezgif.com-gif-maker-2.gif\",\"width\":800,\"height\":341,\"caption\":\"ezgif.com-gif-maker-2\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/magento-development-15-massaction\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Magento 2 Development 18: MassAction\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/645580979f637b0e355deea21bd07462\",\"name\":\"Sanjay Chouhan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cd6ee19f99bd1fcafef819135529c952d7c875d06fedd9fd4c4eb0996bafc1bd?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cd6ee19f99bd1fcafef819135529c952d7c875d06fedd9fd4c4eb0996bafc1bd?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Sanjay Chouhan\"},\"sameAs\":[\"https:\/\/www.instagram.com\/sanjaychouhansc\/\",\"https:\/\/in.linkedin.com\/in\/scchouhansanjay\"],\"url\":\"https:\/\/webkul.com\/blog\/author\/sanjay-chouhan180\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Magento 2 Mass Action in Admin Grid:","description":"This guide explains the step-by-step process to configure mass actions like delete in admin panel, improving efficiency and bulk data management.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/magento-development-15-massaction\/","og_locale":"en_US","og_type":"article","og_title":"Magento 2 Mass Action in Admin Grid:","og_description":"This guide explains the step-by-step process to configure mass actions like delete in admin panel, improving efficiency and bulk data management.","og_url":"https:\/\/webkul.com\/blog\/magento-development-15-massaction\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2021-03-05T12:42:02+00:00","article_modified_time":"2026-04-17T12:56:22+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2021\/03\/ezgif.com-gif-maker-2.gif","type":"","width":"","height":""}],"author":"Sanjay Chouhan","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Sanjay Chouhan","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/magento-development-15-massaction\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/magento-development-15-massaction\/"},"author":{"name":"Sanjay Chouhan","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/645580979f637b0e355deea21bd07462"},"headline":"Magento 2 Development 18: MassAction","datePublished":"2021-03-05T12:42:02+00:00","dateModified":"2026-04-17T12:56:22+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/magento-development-15-massaction\/"},"wordCount":603,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/magento-development-15-massaction\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2021\/03\/ezgif.com-gif-maker-2.gif","keywords":["magento","Magento 2"],"articleSection":["Magento 2"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/magento-development-15-massaction\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/magento-development-15-massaction\/","url":"https:\/\/webkul.com\/blog\/magento-development-15-massaction\/","name":"Magento 2 Mass Action in Admin Grid:","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/magento-development-15-massaction\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/magento-development-15-massaction\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2021\/03\/ezgif.com-gif-maker-2.gif","datePublished":"2021-03-05T12:42:02+00:00","dateModified":"2026-04-17T12:56:22+00:00","description":"This guide explains the step-by-step process to configure mass actions like delete in admin panel, improving efficiency and bulk data management.","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/magento-development-15-massaction\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/magento-development-15-massaction\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/magento-development-15-massaction\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/03\/ezgif.com-gif-maker-2.gif","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/03\/ezgif.com-gif-maker-2.gif","width":800,"height":341,"caption":"ezgif.com-gif-maker-2"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/magento-development-15-massaction\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Magento 2 Development 18: MassAction"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/645580979f637b0e355deea21bd07462","name":"Sanjay Chouhan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cd6ee19f99bd1fcafef819135529c952d7c875d06fedd9fd4c4eb0996bafc1bd?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cd6ee19f99bd1fcafef819135529c952d7c875d06fedd9fd4c4eb0996bafc1bd?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Sanjay Chouhan"},"sameAs":["https:\/\/www.instagram.com\/sanjaychouhansc\/","https:\/\/in.linkedin.com\/in\/scchouhansanjay"],"url":"https:\/\/webkul.com\/blog\/author\/sanjay-chouhan180\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/284518","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/201"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=284518"}],"version-history":[{"count":12,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/284518\/revisions"}],"predecessor-version":[{"id":535632,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/284518\/revisions\/535632"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=284518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=284518"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=284518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}