There is a custom entity called organisation. I am trying to build a view to allow bulk delete of the entities.

I checked the view for display content and there is a field to display the checkbox(Node operations bulk form).

This field doesn't show up for the custom entity. Enabling the actions module does not help.

Adding a custom action for delete organisation does not help either. The new action shows up on the list of actions, but the "operations bulk form" does not show up on views for the entity.

Thanks in advance for your help

2 Answers 2


You need both an action plugin and an action config entity

  1. Create the plugin with drush: drush generate plugin-action
  2. Create the action config entity: look at "system.action.comment_delete_action.yml" for an example.

After creating these, clear the cache and it should be available in views under the label "Bulk update".

  • I created my action plugin using drush (drush generate plugin-action), then I had to create a config like "system.action.comment_delete_action.yml"
    – mpp
    Jul 2, 2018 at 15:26

It looks like as of 8.6.x, this should be possible by just specifying the delete-multiple-form link template and the delete-multiple-confirm form class for the entity type. For the form class, you can use the generic Drupal\Core\Entity\Form\DeleteMultipleForm.

Not managed to get it to work yet though!

  • 1
    Ah, you also need at least one action config entity as well. See Media module for an example of the delete action which uses the derived plugin.
    – joachim
    Jan 17, 2019 at 11:54
  • do you have a code example I'm getting lost in the media module Feb 4, 2021 at 17:22
  • I don't, but IIRC if you generate an entity type with Module Builder it'll produce the code you need.
    – joachim
    Feb 10, 2021 at 10:39
  • Creating the annonations suggested in this post and a config entity like "system.action.media_delete_action.yml" works. Another example : drupal.org/project/drupal/issues/2864689
    – Rufein
    Apr 6, 2021 at 16:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.