Lime Web Components API Documentation - v6.24.0
    Preparing search index...

    Interface LimeObjectCommand

    A command that operates on a single LimeObject.

    LimeObjectCommand is used for actions that target a specific record, such as sending an email to a contact, generating a PDF for a deal, or archiving a specific company. The context property identifies which object the command should operate on.

    @Command({ id: 'send-email' })
    export class SendEmailCommand implements LimeObjectCommand {
    public context: LimeWebComponentContext & { limetype: string; id: number };
    public subject: string;
    public body: string;

    constructor(
    context?: LimeWebComponentContext & { limetype: string; id: number },
    subject?: string,
    body?: string
    ) {
    this.context = context;
    this.subject = subject;
    this.body = body;
    }
    }
    // Execute a single-object command
    const commandBus = platform.get(PlatformServiceName.CommandBus);

    const command = new SendEmailCommand(
    context,
    'Meeting Invitation',
    'Please join us for a meeting...'
    );

    await commandBus.handle(command);
    interface LimeObjectCommand {
        context: LimeWebComponentContext & { id: number; limetype: string };
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    Properties

    context: LimeWebComponentContext & { id: number; limetype: string }

    Context describing the LimeObject the command will operate on.

    Must include both limetype (the type of object) and id (the specific object's identifier). This ensures the command knows exactly which record to target.