Activates an FlexCard creating compiled FlexCardDefinition__c records in Salesforce and sets the script state to active.

Hierarchy

  • FlexCardActivator

Constructors

Properties

logger: Logger
lwcCompiler: FlexCardLwcCompiler
salesforceService: SalesforceService

Methods

  • Activates a FlexCard definition in Salesforce.

    This method performs the following steps:

    1. Finds any currently active cards with the same name as the target card
    2. Deactivates those cards to prevent activation conflicts
    3. Activates the target card
    4. Updates the card's IsActive property to reflect the new state

    Parameters

    Returns Promise<void>

    Throws

    Error if the activation of the target card fails

  • Parameters

    • type: string
    • toolingRecord: {
          FullName: string;
          Id?: string;
          Metadata: any;
      }
      • FullName: string
      • Optional Id?: string
      • Metadata: any

    Returns Promise<{
        errors: string[];
        success: boolean;
    }>