- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2023 01:40 AM
Hi everyone!
I have a pretty annoying issue while editing the Now Agent app on my instance. When I create an input form to get a date, and then use a script action item, everytime I try to use my function in the app, an error messages appears saying "Failed!".
The only log that I have in the instance is:
com.glide.script.RhinoEcmaError: "input" is not defined.
sys_sg_write_back_action_item.4bf6ec2b1b80fd906551dceacd4bcb60 : Line(4) column(0)
1: (function WriteBackAction(input) {
2: //Type appropriate comment here, and begin script below
3: gs.info("test log");
==> 4: })(input);
If i remove the input variable from the WriteBackAction method, the error disappears, but then I can't access my inputs.
Any ideas?
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2023 02:36 AM
Hi everyone, I found the issue. This method signature seems to be invalid by default on the instance. Instead of WriteBackAction(input), you should use this (it works for me):
(function WriteBackAction(parm_input, parm_variable, actionResult) {
// Write your code here
})(parm_input, parm_variable, actionResult);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2023 02:36 AM
Hi everyone, I found the issue. This method signature seems to be invalid by default on the instance. Instead of WriteBackAction(input), you should use this (it works for me):
(function WriteBackAction(parm_input, parm_variable, actionResult) {
// Write your code here
})(parm_input, parm_variable, actionResult);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2025 02:07 PM
Thanks Valentin. It is indeed weird
