Interface ISfdmuRunCustomAddonApiService

Provides the Custom Add-On Api functionality.

Export

Interface

ISfdmuRunCustomAddonApiService

Hierarchy

  • ISfdmuRunCustomAddonApiService

Methods

  • Returns the data which is currently processed by the Plugin. Gives the Add-On module ability to access and modify the data 'on-the-fly'.

    Example

     async onExecute(context: ISfdmuRunCustomAddonContext, args: any): Promise<ISfdmuRunCustomAddonResult> { 

    // Get the data from the Plugin runtime context
    const data = this.runtime.service.getProcessedData(context);

    // Modify the records which are about to be inserted into the Target
    data.recordsToInsert.forEach(record => record['TEST__c'] = 'text');
    }

    Returns

    The data processed by the Plugin in the current runtime context.

    Memberof

    ISfdmuRunCustomAddonApiService

    Parameters

    Returns ISfdmuRunCustomAddonProcessedData

  • Prints message to the console window and to the .log file (if the the file logging is turned on).

    Memberof

    ISfdmuRunCustomAddonApiService

    Parameters

    • module: ISfdmuRunCustomAddonModule

      The currently running Add-On module instance.

    • message: string | object

      The message text or the message template to print.

    • Optional messageType: "INFO" | "WARNING" | "ERROR" | "JSON"

      The type of the message.

    • Rest ...tokens: string[]

      The optional string tokens to replace in the message template.
      For example:

       async onExecute(context: ISfdmuRunCustomAddonContext, args: any): Promise<ISfdmuRunCustomAddonResult> { 
      this.runtime.service.log(this, 'My %s template', 'INFO', 'cool'); // Outputs 'My cool template'
      }

    Returns void

Generated using TypeDoc  |  SFDMU Help Center  |  View on Github