Q. How do I fix the following JavaScript errors in a filter or hook?
"Cannot read property 'length' of undefined"
A. This is likely due to the hard-coded Function input of your JavaScript hook or JavaScript filter having a container named "data”. Verify that your JavaScript matches the container in the function input. If so, you are using the AFE 1.0 format, while the rest of your flow is using AFE 2.0 (which uses the container name “record”).
entry point(\“functionName\“) is not a function
A. This is likely due to the function name in your script not being specified at the top in the Function field of the script or filter editor. If it’s a hook, this could also be that the Function field (when you click the hook icon) either doesn’t have a value or the value doesn’t match that of the function name in the script.
Comments
0 comments
Please sign in to leave a comment.