The CreatorCon Call for Content is officially open! Get started here.

Root cause of JavaScriptException: java.lang.string

JRY
Mega Guru

Hello Team,

I'm attempting to run a flow but receiving an error. I'm not sure what went wrong. as shown in the image below

 

find_real_file.png

Can anyone help me what needs to be change.

Thanks,

JRY

1 ACCEPTED SOLUTION

Abhijit4
Mega Sage

Hi,

In 4th step "Set Flow Variable", You have to write return "error" (as throw "error" will not work).

Let me know if you have any further queries.

Please mark this as Correct or Helpful if it helps.

Thanks and Regards,
Abhijit

By marking my response as correct or helpful, you contribute to helping future readers with similar issues.
Regards,
Abhijit
ServiceNow MVP

View solution in original post

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

error in some inline f(x) script.

please give some details

1) flow is on which table

2) the complete scrip

3) flow screenshot

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar ,

Please find below details

It's Subflow, and I'm attempting to test it with some test data obtained directly from Subflow.

find_real_file.png

 

find_real_file.png

 

find_real_file.png

 

Thanks,

JRY

Hi,

throw error won't work

please use return 'Error';

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Abhijit4
Mega Sage

Hi,

In 4th step "Set Flow Variable", You have to write return "error" (as throw "error" will not work).

Let me know if you have any further queries.

Please mark this as Correct or Helpful if it helps.

Thanks and Regards,
Abhijit

By marking my response as correct or helpful, you contribute to helping future readers with similar issues.
Regards,
Abhijit
ServiceNow MVP