Global Functions   

    Custom functions allow users to manipulate data in ServiceDesk Plus and other external applications. Custom functions are built on Deluge, Zoho's propriety scripting language.

    Global functions are custom functions that can be called from custom actions configured for request, change, or custom schedules, whenever necessary. They can store information that is essential to connect with external applications, common functionalities, and configurations, all of which can be invoked from custom actions.

    You can create and perform other actions on Global functions under either of the following locations:

    • For Requests: Admin > Incident Management > Request Custom Function > Global Functions

    • For Changes: Admin > Problem/Change Management > Change Custom Function > Global Functions

    • For Custom Schedules: Admin > General Settings > Custom Schedules Functions

     

     Adding a New Global Function

    1. Use the New button to create a global function.

    2. On the displayed page, provide a name for your global function.

    3. Select the return type for the global function from the drop-down.

    4. Add a description, if needed.

    5. Specify the parameters and the return type for the parameters. Click  icon to add multiple parameters.

    6. Use the simple drag-and-drop action to select objects from the Deluge Script Editor onto the canvas.

    7. Click Save.

     

    Note:

    You can choose the return type and specify up to 10 parameters.

     

     

    Each global function will be assigned an internal name of format global_function_<id>. The internal name of a global function will be displayed on the header of the Deluge editor. You can use this internal name to call the global function from a custom action.

     

    Test Global Function    

    After writing the custom schedules function, click Save and Test to test run the global function.

    Specify the parameter values, and click Execute.

    Output will be printed along with info statements that are used for debugging.

     

    Debugging Tip  

    When you test a global function, you can debug the code and print the output by using a statement called info.

     

     

    info {return-argument};
    info context;
    return true;

     

    For example, to understand the structure of string priority, date created on you can simply run the following script and study the response.

     

    info string priority,date created on;
    info context;
    return true;

     

    Note:

    For more details on Deluge, visit Deluge help guide.

     

    Global Functions List View   

    After creating global functions, you can manage them from the list view as follows:

    • Click the  icon to edit or delete a custom action. To delete custom actions in bulk, select the custom actions and click Delete on the toolbar.

    • Use keywords to search for global functions from the search bar.

     

     

     

    Zoho Corp. All rights reserved.