Represents the current context object with various properties and methods.

interface CurrentContextObject {
    CallingMegaScriptInstanceId: number;
    CallingMegaScriptInstanceName: string;
    CreateBackup: (() => FileInstance);
    Event: EventObject;
    GetBackup: (() => FileInstance);
    HasBackup: (() => boolean);
    JobId: string;
    OutputFile: FileInstance;
    OutputMode: string;
    Parameter: any;
    QueuedOn: Date;
    RemoveBackup: (() => void);
}

Properties

CallingMegaScriptInstanceId: number

The ID of the MegaScript instance that initiated the current context.

CallingMegaScriptInstanceName: string

The name of the MegaScript instance that initiated the current context.

CreateBackup: (() => FileInstance)

Retrieves the backup file instance of the current context.

Type declaration

The event object associated with the current context.

GetBackup: (() => FileInstance)

Retrieves the backup file instance of the current context.

Type declaration

HasBackup: (() => boolean)

Checks if a backup of the current context exists.

Type declaration

    • (): boolean
    • Returns boolean

      true if a backup exists, otherwise false.

JobId: string

The job ID string associated with the current context. This can be a number or a number prefixed with a type.

OutputFile: FileInstance

The output file instance associated with the current context.

OutputMode: string

The output mode for the current context.

Parameter: any

Additional parameters or data associated with the current context.

QueuedOn: Date

The date and time when the current context was queued.

RemoveBackup: (() => void)

Removes the backup of the current context.