@servicenow/sdk - v4.4.1
    Preparing search index...
    action: {
        <I, O, RawO extends Record<string, FlowValueType>, const TInputs>(
            _action: __type<I, O, RawO>,
            _config: ActionInstanceConfig,
            _inputs: Exact<I, TInputs>,
        ): ResolveActionOutputs<O, RawO, TInputs> & { type: "action" } & DefaultActionOutputs;
        (
            _action: string,
            _config: ActionInstanceConfig,
            _inputs: Record<string, any>,
        ): any;
    } = Action

    Type Declaration

      • <I, O, RawO extends Record<string, FlowValueType>, const TInputs>(
            _action: __type<I, O, RawO>,
            _config: ActionInstanceConfig,
            _inputs: Exact<I, TInputs>,
        ): ResolveActionOutputs<O, RawO, TInputs> & { type: "action" } & DefaultActionOutputs
      • Action instance with known Action definition - provides type-safe output property access with table-aware typing for outputs with dependent fields. Enforces exact input matching - excess properties not defined in the action will cause type errors.

        Type Parameters

        • I

          The type of the input parameters for the action.

        • O

          The type of the output parameters for the action.

        • RawO extends Record<string, FlowValueType>

          The raw outputs schema (FlowValueType) for checking dependent fields.

        • const TInputs

          The actual input type being passed, which must exactly match I (no excess properties).

        Parameters

        • _action: __type<I, O, RawO>

          The Action object (created by ActionDefinition).

        • _config: ActionInstanceConfig

          Configuration object with $id and optional annotation.

        • _inputs: Exact<I, TInputs>

          The input data provided to the action. Must match the action definition exactly.

        Returns ResolveActionOutputs<O, RawO, TInputs> & { type: "action" } & DefaultActionOutputs

        The expected output of the action, with table-aware typing when applicable.

        // IntelliSense shows fields from 'incident' table on result.record
        const result = wfa.action(
        action.core.createRecord,
        { $id: Now.ID['create_incident'] },
        { table_name: 'incident', values: '' }
        )
        result.record.number // IntelliSense for incident fields
        result.record.short_description
      • (
            _action: string,
            _config: ActionInstanceConfig,
            _inputs: Record<string, any>,
        ): any
      • Action instance with sys_id fallback - allows arbitrary property access for datapill references

        Parameters

        • _action: string

          A string sys_id when the action definition cannot be resolved.

        • _config: ActionInstanceConfig

          Configuration object with $id and optional annotation.

        • _inputs: Record<string, any>

          The input data provided to the action (untyped).

        Returns any

        An object with arbitrary property access to support datapill references like .name, .age, etc.