Script Call

Hierarchy

  • any
    • ItemScriptCall

Constructors

Properties

_id?: string

Internal ID.

category: string
hidden?: boolean

Hidden from normal user, even document owner.

img?: any

Script image. If type is macro, this is overwritten by the macro image.

name?: any

Script name. If type is macro, this is overwritten by the macro name.

type: "script" | "macro"
value: string

If type is script, this is the script body. If type is macro, this is the UUID to the macro.

Accessors

Methods

  • Parameters

    • __namedParameters: { editable?: boolean } = {}

    Returns Promise<any>

  • Executes the script.

    Parameters

    • shared: object

      An object passed between script calls, and which is passed back as a result of ItemPF.executeScriptCalls.

    • extraParams: object = {}

      A dictionary containing extra parameters to pass on to the call.

    Returns any

    • Script return value if any
  • Creates a script call.

    Parameters

    • data: object[]

      Data to initialize the script call(s) with.

    • context: { parent?: ItemPF }

      An object containing context information.

      • Optionalparent?: ItemPF

        The parent entity to create the script call within.

    Returns ItemScriptCall[]

    • The resulting script calls, or an empty array if nothing was created.
  • Returns {
        _id: any;
        category: any;
        hidden: any;
        img: any;
        name: any;
        type: any;
        value: any;
    }