CMDBuild Forum

Issues with Custom Script Execution in CMDBuild

Hello everyone, :blush:

I’m currently working on customizing CMDBuild with custom scripts and have encountered a problem. When executing my scripts, I’m receiving unexpected errors that are disrupting the workflow.

Here are the details of the issue:

Error Message: Script failed to execute due to an unexpected error: SyntaxError: Unexpected token ‘}’

Script Details: The script is intended to automate the process of updating asset records. Here’s a snippet of the code:

// Example script snippet var asset = cmdbuild.getAssetById(123); asset.name = “Updated Name”; cmdbuild.saveAsset(asset);

CMDBuild Version: 3.2.0

Environment: Using a standalone server setup on Ubuntu 20.04 with the default CMDBuild plugins.

I’ve checked for syntax errors and corrected what I could find. I’ve tried running the script in different environments, but the issue persists. I’ve also reviewed the CMDBuild documentation but did not find a relevant solution.

Has anyone experienced similar issues with custom scripts in CMDBuild?

What are some effective ways to debug and resolve script execution errors in CMDBuild?

Are there known issues or limitations with CMDBuild version 3.2.0 that could be causing these errors? I have checked https://www.cmdbuild.org/en/documentation and splunk documentation guide but still need help .

I would greatly appreciate any insights or suggestions you might have. Thank you in advance for your assistance!

Best regards