cancel
Showing results for 
Search instead for 
Did you mean: 

does the workflow script task support the native JavaScript function?

0 Kudos

Hi,

I trying to use the replace function of js, the when the workflow run the script task it's pop up error.

the code as bellow:

var str = "this is a cat";

var str1 = str.replace('this','that');

the error log:

Error message:An unspecified error occurred. Contact support citing logId 8e8c6a4d-2d8a-49cf-8a3b-772cd1dda9a8 and provide steps to reproduce.

Regards,

Guoqing

Accepted Solutions (0)

Answers (1)

Answers (1)

tobias_breyer
Contributor

You found a small bug, I suppose we will fix that as soon as possible. You can get it working when you replace the literal string to search for by a regex, i.e.

str.replace(/this/,'that')

0 Kudos

dose the script task support all kind of the es5 of js?