LimeObjectBulkAction: Action<LimeObjectBulkCommand>

Specialized action type for bulk operations on multiple LimeObjects.

Bulk actions are used when the user selects multiple objects and wants to perform the same operation on all of them. These actions typically appear in:

  • List view toolbars (when items are selected)
  • Bulk action menus
  • Selection context menus

The command associated with this action type is LimeObjectBulkCommand, which uses a filter expression to specify which objects to operate on.

Common use cases include:

  • Mass updates (change status, assign owner)
  • Bulk exports (download selected records)
  • Batch operations (send emails, delete records)

Example

Bulk actions for a list view

const exportCommand = new BulkExportCommand();
exportCommand.context = { limetype: 'contact' };
exportCommand.filter = selectedObjectsFilter;

const deleteCommand = new BulkDeleteCommand();
deleteCommand.context = { limetype: 'contact' };
deleteCommand.filter = selectedObjectsFilter;

const sendEmailCommand = new BulkSendEmailCommand();
sendEmailCommand.context = { limetype: 'contact' };
sendEmailCommand.filter = selectedObjectsFilter;

const bulkActions = [
{
label: 'Export to Excel',
icon: 'file-excel',
description: 'Download selected records as Excel spreadsheet',
command: exportCommand
},
{
label: 'Delete Selected',
icon: 'trash',
description: 'Permanently delete all selected records',
command: deleteCommand
},
{
label: 'Send Email',
icon: 'envelope',
description: 'Send email to all selected contacts',
command: sendEmailCommand
}
];

Example

Conditional bulk action with minimum selection

const updateStatusCommand = new BulkUpdateStatusCommand();
updateStatusCommand.context = { limetype: 'deal' };
updateStatusCommand.filter = selectedObjectsFilter;

const bulkUpdateAction = {
label: 'Update Status',
icon: 'edit',
description: 'Change status for all selected records',
command: updateStatusCommand,
disabled: !selectedObjectsFilter
};

See