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

    Type Alias LimeObjectActionBeta

    LimeObjectAction: Action<LimeObjectCommand>

    Specialized action type for operations on a single LimeObject.

    LimeObject actions are used in contexts where the user interacts with a single business object instance (deal, contact, company, etc.).

    The command associated with this action type is LimeObjectCommand, which provides type-safe access to object-specific payload properties.

    Actions for a contact detail view

    const sendEmailCommand = new SendEmailCommand();
    sendEmailCommand.context = { limetype: 'contact', id: contact.id };

    const scheduleMeetingCommand = new ScheduleMeetingCommand();
    scheduleMeetingCommand.context = { limetype: 'contact', id: contact.id };

    const addToCampaignCommand = new AddToCampaignCommand();
    addToCampaignCommand.context = { limetype: 'contact', id: contact.id };

    const actions = [
    {
    label: 'Send Email',
    icon: 'envelope',
    command: sendEmailCommand
    },
    {
    label: 'Schedule Meeting',
    icon: 'calendar',
    command: scheduleMeetingCommand
    },
    {
    label: 'Add to Campaign',
    icon: 'bullhorn',
    command: addToCampaignCommand
    }
    ];

    Conditional action based on object state

    const isDealOpen = {
    id: 'deal.is-open',
    type: 'limeobject',
    evaluate: (deal) => deal.dealstatus !== 'won' && deal.dealstatus !== 'lost'
    };

    const closeDealCommand = new CloseDealCommand();
    closeDealCommand.context = { limetype: 'deal', id: dealId };

    const closeDealAction = {
    label: 'Close Deal',
    icon: 'check-circle',
    description: 'Mark this deal as won or lost',
    command: closeDealCommand,
    condition: isDealOpen
    };