Context describing the LimeType the command will operate on.
Must include limetype to identify which type of objects to operate on.
If parent is set on the context, it indicates that the LimeObjects
are all related to a common parent LimeObject via a belongsto relation.
An Expression describing which LimeObjects to operate on.
Can be null to operate on all objects (subject to parent context filtering),
or a filter expression to limit the operation to specific records.
import { Expression, Operator } from '@limetech/lime-web-components';
const selectedIds: Expression = {
key: 'id',
op: Operator.IN,
exp: [1, 2, 3],
};
const largeActiveDeals: Expression = {
op: Operator.AND,
exp: [
{ key: 'status', op: Operator.EQUALS, exp: 'active' },
{ key: 'value', op: Operator.GREATER, exp: 10_000 },
],
};
// null means every object the context allows, with no further filtering.
const allObjects: Expression | null = null;
A command that operates on multiple LimeObjects of a single LimeType.
LimeObjectBulkCommand is used for batch operations on multiple records, such as exporting selected deals to Excel, sending bulk emails, or mass-updating status fields. The filter property determines which objects are included in the operation.
Example: Declare a bulk command
Example: Execute a bulk command on selected items
Example: Execute a bulk command on the objects of one parent