Brazil upgrade: Flow Designer 'fd_data is not defined' error

Nathan Billing
Tera Contributor

Thought I'd share this one as it took a fair bit of troubleshooting to track down.

Following our upgrade from Zurich to Brazil, we had a flow start failing in a Set Flow Variables step. The inline script hadn't changed and had been working for a couple of years.

The error in the flow execution details was:

Error: "fd_data" is not defined.

What made it a little harder to spot was that the step showed as "Completed (error skipped)", so the flow continued running but the variable wasn't being populated.

After working through the script, I eventually narrowed it down to a regular expression we were using to clean up characters in usernames.

The original regex contained a literal apostrophe:

.replace(/[\u2010-\u2015\u2E3A\u2E3B'-]/g, "")

Nothing obviously wrong with the JavaScript itself, but removing the apostrophe stopped the fd_data error.

To check what was happening, I created a simple test subflow and tried three variations:

  1. Script referencing fd_data, without the apostrophe: worked.

  2. Same regex, but using hardcoded values instead of fd_data: worked.

  3. Script referencing fd_data with the apostrophe in the regex: failed with "fd_data" is not defined.

The workaround was to replace the literal apostrophe with its Unicode escape:

.replace(/[\u2010-\u2015\u2E3A\u2E3B\u0027-]/g, "")

This preserves the same regex behaviour, and the flow started working again.

My suspicion is that something in how Brazil processes inline scripts is interpreting the apostrophe before the script executes, although I haven't confirmed the underlying cause.

If you're seeing unexpected fd_data is not defined errors after upgrading, it may be worth checking for similar characters in your inline scripts.

 

I managed to resolve this by using the Unicode escape, but I'd be interested to know whether anyone else has encountered it following the Brazil upgrade, or whether ServiceNow has acknowledged it as a known issue.

 

#brazil patch 2 #flow designer #upgrade

0 REPLIES 0