Thank you for supporting the Cloud Customer Connect Community in 2024. It's a gift to work with you!

Look back
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Getting JavaScript validator error for JSON based Action chain.

Summary:

JavaScript validator error when using alias name in For-Each condition in JSON based Action chain.

Content (please ensure you mask any confidential information):

We are using alias names in most of the For-Each conditions in our application and recently an error pops up in the Audit log 'JavaScript validation error: 'skills' is not defined'. But the for-each loop works as expected and there no issues in running the Action chain.

Here is the sample code with screenshot of the error :


     "forEachInCreateSkill": {
      "module": "vb/action/builtin/forEachAction",
      "parameters": {
        "items": "{{ $page.variables.createSkill }}",
        "as": "skills",
        "actionId": "fireNotification"
      }
    },
    "fireNotification": {
      "module": "vb/action/builtin/fireNotificationEventAction",
      "parameters": {
        "target": "leaf",
        "summary": "[[ JSON.stringify(skills.data )]]",
        "displayMode": "transient",
        "type": "info"
      }
    }

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!