How can I run a command in the Gateway scope?

The user holding the project has access to a location on the network but when I run:
system.file.readFileAsString(path)
the access is denied.

I am running the command from Scripting --> Project Library

Use a gateway message handler.

https://docs.inductiveautomation.com/display/DOC81/Gateway+Event+Scripts
https://docs.inductiveautomation.com/display/DOC81/system.util.sendMessage
https://docs.inductiveautomation.com/display/DOC81/system.util.sendRequest
https://docs.inductiveautomation.com/display/DOC81/system.util.sendRequestAsync

1 Like