Widget function call not working – need help

Widget function call not working – need help

Hi everyone,
I'm building a widget for Zoho CRM and trying to call a Deluge function from it using ZOHO.CRM.FUNCTIONS.execute, but it's not working.

Here’s what I did:

  • I created a Standalone function in Deluge.

  • I'm calling it inside ZOHO.embeddedApp.on("PageLoad", ...) in my widget's JavaScript.

  • The function name is correct, and I pass the required arguments.

  • But the function doesn't seem to run at all — I don’t see any response or error in the console.

Is there something I need to enable or configure to make the function run from a widget?

Any help would be appreciated!

  1. ZOHO.CRM.FUNCTIONS.invoke({
            name: "my_functuin",
            arguments: { recordId: recordId }
          }).then(response => {
                console.log("API Response:", response);
            treeData = response.details.output;