Skip to main content
Share Your Experience: Take the 2024 Developer Survey
35 votes
Accepted

Magento 2 massaction delete not working

Try the following code: <?php namespace Vendor\ModuleName\Controller\Adminhtml\Module; use Magento\Backend\App\Action\Context; use Magento\Ui\Component\MassAction\Filter; use Vendor\ModuleName\...
Bartłomiej Szubert's user avatar
28 votes
Accepted

"Unknown columns" error when executing a mass action

It creates an issue because you didn't define $_idFieldName in your ResourceModel Collection Please add this line in Vendor\MyModule\Model\ResourceModel\MyModel\Collectionfile. /** * @var ...
Keyur Shah's user avatar
  • 18.1k
14 votes

Magento 2: Add a mass action block item for a UI Component grid

Please note that since Magento 2.1.x, the XML has slightly changed. You now have to use <listingToolbar/> instead of <container/>: <listingToolbar name="listing_top"> <...
Giel Berkers's user avatar
  • 12.3k
10 votes

How to remove Delete option from massaction dropdown for specific user role in Magento2?

This can be done by creating a new class for MassActions: <?php namespace YourVendor\YourModule\Ui; class MassAction extends \Magento\Ui\Component\MassAction { private $authorization; ...
Sergii Ivashchenko's user avatar
10 votes
Accepted

Magento 2: MassAction Model LSD method delete()

LSD comes from load/save/delete. You should not call these methods inside loops. But in this case, if you want to hide the dirt under the rug you can crete a new method in your class private ...
Marius's user avatar
  • 198k
8 votes

Invalid Method name delete in magento 2

you need to make change in di.xml file. Replace this Line: Company\Module\Model\ResourceModel\Test\Collection Replace With this: Company\Module\Model\ResourceModel\Test\Grid\Collection In virtual ...
Kamal Jain's user avatar
7 votes
Accepted

Implement massactions in grid using ui_component magento2

Please try this. It's working fine for me. <massaction name="listing_massaction"> <action name="delete"> <argument name="data" xsi:type="array"> &...
Dharmendra Jadav's user avatar
7 votes

Magento 2 massaction delete not working

Follow this process to implement Massaction delete Namespace: Prince Modulename: PincodeChecker 1) Use this code in UI Grid file(prince_pincodechecker_index.xml) before <massaction name="...
Prince Patel's user avatar
  • 22.7k
5 votes
Accepted

Best practice/scalable way to mass update tier prices?

The best way to update tier prices in bulk (as any batch of data in Magento) is to use direct database communication approach. In your case I would do the following: Create a new temporary table into ...
Ivan Chepurnyi's user avatar
5 votes
Accepted

Solved - Adding Mass Delete Action to the Grid

You can also try this code. Put below code into your grid.php protected function _prepareMassaction() { $this->setMassactionIdField('id'); $this->getMassactionBlock()->...
ARVIND KARKAR's user avatar
5 votes
Accepted

Mass status in admingrid: Ui form

You can define your massaction in your uicomponent grid. Inside listingToolbar> tag you can define <massaction> as many mass action you want. <listingToolbar name="listing_top"> &...
Priyank's user avatar
  • 7,692
5 votes

Add new mass action in order grid in magento 1.9

Flow below steps Step:1 Create file Ar_Custom.xml at location app\etc\modules and add below code <?xml version="1.0"?> <config> <modules> <Ar_Custom> ...
Abdul's user avatar
  • 9,701
5 votes

Adding url parameters to UI component mass action

1) Add class to attribute to action, and replace url item with urlPath: <massaction name="listing_massaction" > <action name="additem" class="Vendor\Module\Ui\Component\Action\AddItem"&...
Alex Melnikov's user avatar
3 votes
Accepted

Magento - Extending Mass Action Grid Filters ("Select All", "Select None") to Sales > Orders Grid

For the select all option you have to overwrite or copy app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php file with same structure in code/local folder In the _prepareMassaction() method there ...
Ashish Jagnani's user avatar
3 votes

Magento 2 massaction delete not working

You can try this code :- public function execute() { $collection = $this->_filter->getCollection($this->_collectionFactory->create()); $recordDeleted = 0; foreach ($...
Limbani Himanshu's user avatar
3 votes

Mass Action not sending all data

I spent a lot of time trying to understand, what is wrong with my code, and why Magento does not send selected parameter with ids in POST request, when mass action is called. Later I found this "...
Svetlana Kazakova's user avatar
3 votes

Mass delete action in one step not in loop magento 2

Took me a little while to get syntax right on this but you can do a delete from select Not saying it fits your project but I think it is useful to know https://github.com/DominicWatts/QuoteCleaner/...
Dominic Pixie's user avatar
3 votes

Mass status in admingrid: Ui form

I have added tree-massactions and display area in grid structure. After that Mass actions works fine. Here I have given grid structure for mass actions. Hope it helps. grid.xml for Massactions <...
Jaisa's user avatar
  • 2,626
3 votes
Accepted

Magento 2 Mass shipment

First Made the ui component in your module app\code\Vendor\Module\view\adminhtml\ui_component\sales_order_grid.xml <?xml version="1.0" encoding="UTF-8"?> <listing xmlns:xsi="http://www.w3....
Muhammad Hasham's user avatar
2 votes

Magento 2 massaction delete not working

You can just try inside your controller file, public function execute() { $deleteIds = $this->getRequest()->getParam('teams'); if (!is_array($deleteIds) || empty($deleteIds)...
Rakesh Jesadiya's user avatar
2 votes
Accepted

got error on mass edit magento 2

Problem was with these two lines <item name="provider" xsi:type="string">test_test_columns.test_test_columns.listing_top.bookmarks</item> <item name="selectProvider" xsi:type="...
Qaisar Satti's user avatar
  • 32.5k
2 votes
Accepted

Mass Action in Order Grid

Problem resolved ! There was a mistake in my controller. I've chosen other type of router initialize (like my edits) but I forgot about modules container, so now my config.xml look like: ... <...
Bananowy's user avatar
2 votes

How to add Select All option in Export Settings of Magento 2

Add a "select all" button beside "Reset Filter". We need add plugin to class Magento\Backend\Block\Widget\Grid\Extended with getMainButtonsHtml method. As below <config xmlns:xsi="http://www.w3....
Nadim's user avatar
  • 91
2 votes

Mass delete action in one step not in loop magento 2

try { $categoriesIds = ['1','2','3']; // use collection factory object of particular model $catgoryObj = $this->_objectManager->get('MageArray\Gallery\Model\ResourceModel\Category\...
Prashant Patel's user avatar
2 votes
Accepted

Need pass dynamic url param value in massAction url of ui-component grid

In my dataProvider class Package\Module\Ui\Component\RsvpDataProvider in below segment: <argument name="class" xsi:type="string">Package\Module\Ui\Component\RsvpDataProvider</argument> ...
Ashish Raj's user avatar
  • 1,335
2 votes
Accepted

Difference in approach for Mass Order Hold and Unhold

My money is on "The mass unhold was not refactored yet". THe order management interface has the methods hold and unHold that work the same way. They retrieve the order object, call the hold / unhold ...
Marius's user avatar
  • 198k
2 votes
Accepted

Magento2 Add line separator in mass action list in sales order grid

I got one of the resolution of my question. In order to add line separator between mass action just like Amasty extension. person should add this action in listing_massaction tag in ui component file. ...
Muhammad Hasham's user avatar
2 votes

Magento 2.3.0 : Admin panel mass status action change after not updated in custom module grid record

This issue is resolved in controller got to CustomModule/Videogallery/Controller/Adminhtml/videogallery/massstatus.php inside execute function $post->setIsActive($status)->save(); change to $...
Rv Singh's user avatar
  • 1,617
2 votes
Accepted

Admin Grid "Select All" for mass action only sends the visible IDs

This is an upstream bug: https://github.com/magento/magento2/issues/23110 Solution: https://github.com/magento/magento2/pull/22704/commits/595a7a8f56571a5bd2753096bef9db27d46020ff app/code/Magento/...
schnere's user avatar
  • 472
2 votes
Accepted

`Selected` field is missing from the post request for the product grid mass action

I had a look how the mass delete is done in the core and i saw that i missed some parts. use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory; use Magento\Ui\Component\MassAction\Filter; ....
Attila Naghi's user avatar
  • 4,023

Only top scored, non community-wiki answers of a minimum length are eligible