This topic contains 2 replies, has 2 voices, and was last updated by Mike Kudelya 7 years, 9 months ago.
- Topic
I created a new mass-action for order-items-grid in orocrmmagentobundle. But have a little bug, when selected only one item and executed delete mass action I get a error ‘There is nothing to do in mass action “delete””. The method this.datagrid.getSelectionState() returned Object which contain array selectedIds , but value of every item is undefined. On another pages situation is different, delete mass action worked as expected. What problem can be here?
My datagrid:1234567magento-orderitem-grid:mass_actions:sendshipment:type: sendshipmententity_name: %orocrm_magento.entity.order_item.class%data_identifier: oi.idicon: checkMy send-shioment-action.js:
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061define(['underscore','oroui/js/messenger','orotranslation/js/translator','oro/datagrid/action/mass-action'], function(_, messenger, __, MassAction) {'use strict';var SendShipmentAction;/*** Mark email as read/unread** @export oro/datagrid/action/sendshipment-action* @class oro.datagrid.action.SendShipmentAction* @extends oro.datagrid.action.MassAction*/SendShipmentAction = MassAction.extend({executeConfiguredAction: function() {switch (this.frontend_handle) {case 'ajax':this._handleAjax();break;case 'redirect':this._handleRedirect();break;case 'sendshipment':this._handleSendShipment();break;default:this._handleWidget();}},_handleSendShipment: function() {if (this.dispatched) {return;}console.log('here!', this.datagrid.getSelectionState());},getActionParameters: function() {var selectionState = this.datagrid.getSelectionState();var collection = this.datagrid.collection;var params = {inset: selectionState.inset ? 1 : 0,values: selectionState.selectedIds.join(',')};params = collection.processFiltersParams(params, null, 'filters');return params;},});return SendShipmentAction;});
The forum ‘OroPlatform – How do I? Questions’ is closed to new topics and replies.