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"
}
}
Tagged:
0