Updated on 2025-08-15 GMT+08:00

Managing Scripts

Creating a Script Using an Existing Script

You do not need to enter the script editor. On the page for adding a script, select Use an Existing Script to create a script.

  1. Log in to the application designer by referring to Logging In to the Application Designer.
  2. In the navigation pane, choose Logic.
  3. Click next to Script. The page for adding a script is displayed.
  4. Select Use an Existing Script, select the target script, and click Add.
  5. Edit the content of the new script and click in the upper part of the page to save the script.
  6. Test the script to ensure that the running result meets the expectation, and click to activate it.

Editing a Script

After a script is created, you can modify the script if the service requirements change.

  1. Log in to the application designer by referring to Logging In to the Application Designer.
  2. In the navigation pane, choose Logic.
  3. Move the cursor to of the target script, and choose Edit. The script details page is displayed.
  4. Click next to a parameter to edit the parameter.

    Table 1 Script parameters

    Parameter

    Description

    Click this button to access the script editor page.

    • If the script has multiple versions, the script editor page of the activated version is displayed.
    • If none of the versions is activated, the script editor page of the latest version is displayed.

    Name

    Name of a script, that is, the name configured when the script is created.

    Is Active

    Whether a script is activated.

    • If this parameter is selected, the script is activated.
    • If this parameter is not selected, the script is deactivated.

    belonging APP

    Application to which the script belongs.

    Version

    Version of a script.

    Method Name

    Method name of a script.

    Visibility

    Whether a script is visible.

    Overridable

    Whether a resource can be customized as a new version, imported to an add-on application, or saved as a new version if it already exists in an add-on application.

    This parameter is selected by default. When it is not selected, the description is as follows:

    • When you customize a new version based on the resource, the following error message is displayed: XXX does not support the customization of a new version. Check the basic attributes and confirm whether the asset can be overwritten.
    • This resource cannot be imported to an add-on application.
    • If the resource has been imported to an add-on application, the new version cannot be customized.

    Description

    Description of a script. Enter the function of the script.

    Creator

    Script creator.

    Created

    Script creation time.

    Last Modified By

    User who last modified the script.

    Last Modified

    Time when the script was last modified.

    Input Parameters

    This area displays the input parameters of a script, including Name, Data Type, Is Collection, and Description.

    • If the script has multiple versions, the parameters of the activated version are displayed.
    • If none of the versions is activated, the parameters of the latest version are displayed.

    Output Parameters

    This area displays the output parameters of a script, including Name, Data Type, Is Collection, and Description.

    • If the script has multiple versions, the parameters of the activated version are displayed.
    • If none of the versions is activated, the parameters of the latest version are displayed.

    Version

    Displays all versions of the script.

Moving a Script

After a script is created, you can move the script to an application with development permissions. For example, if a script created in application A is needed in application B, you can clone it in application A and move the clone to application B.

  1. Log in to the application designer by referring to Logging In to the Application Designer.
  2. In the navigation pane, choose Logic.
  3. Move the cursor to of the target script and choose Move.
  4. In the Move to another app page, select the element to be moved and click Next.
  5. Select the target application and click Confirm.

    The script can be moved only to applications with development permissions.

Cloning a Script

You can clone a script to an application. For example, if application A contains scripts with similar functions, you can clone one script to make a new one. This allows you to editing the clone without starting the creation process over.

  1. Log in to the application designer by referring to Logging In to the Application Designer.
  2. In the navigation pane, choose Logic.
  3. Move the cursor to of the target script and choose Clone.
  4. Set the unique ID of the event and click Confirm.

    After the cloning is successful, you can view the cloned script in the script folder.

Deleting a Script

If a script is no longer used, you can delete it from the application to prevent it from occupying the resource quota of the account.

  1. Log in to the application designer by referring to Logging In to the Application Designer.
  2. In the navigation pane, choose Logic.
  3. Move the cursor to of the target script and choose Delete.
  4. In the displayed dialog box, select Delete the records in the resource. Click Confirm. Then the script is deleted.

    If you do not select Delete the records in the resource, only the script is deleted. The function modules that use the script are not affected.