Deluge Functions Editor

A guided tour of the Deluge Function editor, covering the panels and controls required to write, test, save, and manage your Functions.

 

Access the Function editor from SetupDeveloper HubFunctions. Open an existing Function or click Create Function to create a new one.

Editor Layout

The editor is divided into several panels, each serving a specific purpose during the development workflow.

Code Panel

The main editing area where you write your Function script. It supports syntax highlighting and basic auto-complete for Deluge.

  • The Function declaration is pre-populated in the format: <return_type> <category>.<function_name>()
  • Write your logic inside the declaration body
  • For Deluge, built-in zoho.crm.* namespaces and common keywords are available via auto-complete

Code Panel

Arguments Panel

Defines the input parameters your Function accepts. Each argument has a name, data type, and an optional default value.

  • Supported types: String, Integer, Boolean, Map, List, CRM Record
  • Deluge: Arguments defined here are accessible inside the script via the input map. For Functions triggered by Workflow Rules or Buttons, each argument must be manually mapped to a CRM field (using merge variables) at the point of association.
  • Java, Node.js, Python: These languages use basicIO, a standardized input/output mechanism that automatically passes the trigger context to the Function. You do not need to declare or map individual arguments manually; the Function reads from the basicIO request object instead.

Arguments Panel

See Accessing Arguments for detailed guidance.

Return Type

Configures the data type of the value the Function returns. The available return types depend on the Function's category:

  • Standalone: String (default)
  • Button: String (displayed as a modal in the CRM UI)
  • Automation: Void (runs asynchronously and does not return a value)
  • Schedule: Void (no return value)
  • Related List: String (XML rendered on the CRM record page)
  • Signals: String
  • Validation Rule: Map (containing pass/fail status and error message)

Console / Logs Panel

Displays real-time output from info() statements and any runtime errors during execution. This is the primary tool for verifying output and debugging.

  • Output appears here when you click Run.
  • Errors include line numbers and stack traces where available.
  • Previous execution logs are available in the execution history.

Console Panel

Running and Testing

Click Run in the editor toolbar to execute the Function inline. If the Function has defined arguments, you will be prompted to provide test values before execution begins.

  • Use info() (Deluge) or equivalent logging in other languages to print intermediate values to the Console.
  • The Console shows output in real time as the Function executes.
  • Failed executions display the error details and can be rerun from the logs.

Saving and Revision History

Every time you save the Function, a revision snapshot is created automatically.

  • Browse the full change history from the Revisions menu in the editor.
  • Restore any previous version with a single click.
  • No external version control setup is required for basic rollback needs.

Revisions Panel