com.glide.script.fencing.MethodNotAllowedException in workflow Run Script activity

JG6
Kilo Guru

The full error message:

JavaException: com.glide.script.fencing.MethodNotAllowedException: Function getValue is not allowed in scope x_*****

It happens when running code in a workflow Run Script activity. More precise at the statement:

current.variables.******.getValue()

 

I presume this happens because my application is not allowed to execute this method because it's outside the Global application scope. I've been checking a lot of documentation and tried a lot of things, but I can't seem to put my finger on the culprit.

My best guess is that I need to set cross scope privileges. Presumably with the target scope "Global", target type "scriptable" and "execute api" for the operation. As for the target name, I've been trying loads of names, but nothing seems to help. My best bet was "GlideRecord.getValue", but it does not work.

Can somebody help me to find out how to grant the script privileges ?

 

 

 

1 ACCEPTED SOLUTION

Nikhil Bahurup1
Tera Expert

Can you try without getValue() like current.variables.variablename 

View solution in original post

2 REPLIES 2

Nikhil Bahurup1
Tera Expert

Can you try without getValue() like current.variables.variablename 

It seems the method invocation security is bypassed when asked for the string representation of the variable. Which is probably not the intention. But it works indeed.