fd_data is not defined

Robert Bigelow
Tera Contributor

I have built a few custom tables, extending the Task table, to bring our HTML forms into our new Service Portal. I've been working on this for a couple weeks, testing each form as I go. I build a Flow to route the form and send an email notification to the right people.

That email is scripted in Flow Designer, using a string literal and concatenation to fill in the blanks from the Record Producer. I use fd_data to access the data in the Flow. It has been working great, until this morning. I finished my last form, and tests are failing. I'm seeing the error in the Execution "fd_data is not defined"

I went back to one of the other flows that was working great to see if I accidentally did something different, but the code is identical. fd_data pops up when I type it in, and I can dot walk through the Flow data as usual.

The crazy part is, now even the Flows that were working great are giving the same error.

This is a tiny snip of what I'm doing. It's pretty standard, and was working great yesterday.

var body = "<table>\
   <tr><td><a href='https://rcchelpdesk.service-now.com/now/workspace/agent/record/u_user_account_form/" + fd_data.trigger.current.sys_id + "'>Link to form</a></td>";
   body = body + "</tr>\
   <tr>\";

I didn't change any of the code, it just stopped working. I suspect the code is fine, and it's something elsewhere in my instance, but I'm not really sure what. Any ideas?

1 ACCEPTED SOLUTION

Robert Bigelow
Tera Contributor

I figured it out.

I'm still not sure why, but it suddenly decided it didn't like the way I was concatenating the strings inline with the sys_id. When I separated those out to three different lines, it works now.

View solution in original post

9 REPLIES 9

Robert Bigelow
Tera Contributor

I figured it out.

I'm still not sure why, but it suddenly decided it didn't like the way I was concatenating the strings inline with the sys_id. When I separated those out to three different lines, it works now.

I am having the same issue.  Can you please explain how you separated these out? Thanks!

Thank you! I encountered this bug as well and I was tearing my hair out trying to understand what was wrong. I followed your advice by separating a string concatenation over several lines and everything works perfectly!

Johan Arif Clav
Tera Contributor

Thank you for sharing. Your solution worked for me!