- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2020 09:50 AM
I have a Flow in Flow Design and when I test it, I get:
There was an error executing the flow: Internal Server Error
How do I debug this?
I have torn the actions apart several times and cannot isolate the error. This action is critical to my application. It is also complex, so showing and explaining the code is difficult.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2020 05:44 PM
It turns out that the problem is the SLADue script has two var statements for the days variable. When I fixed the javascript, the internal error went away. My trigger now works.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2020 09:56 AM
Hi
Can you submit some more details, screenshots etc.?
BR
Dirk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2020 10:28 AM
Here is the overview:
Here are the details:
There are three scripts in the above:
SLA Due:
var gdt = new GlideDateTime();
var today = new GlideDateTime(gdt.getDisplayValue());
if (fd_data._1__look_up_record.record.sla_type == 'DAYS') {
var days = fd_data._1__look_up_record.record.sla_amount;
today.addDaysLocalTime(days);
}
if (fd_data._1__look_up_record.record.sla_type == 'DUR') {
var days = 10;
today.addDaysLocalTime(days);
}
return today;
Revision #:
Status:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2020 05:44 PM
It turns out that the problem is the SLADue script has two var statements for the days variable. When I fixed the javascript, the internal error went away. My trigger now works.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2020 11:34 PM
Hi John
Great! Nice to see, that you were able to sort out.
Thanks a lot for sharing the root cause here.
Have fun & Enjoy ServiceNow
BR
Dirk