I am trying to call system.db.runNamedQuery() in a Shared script. I would like to be able to call this from both Project scope (button on a client) as well as Gateway scope (tag change script based on datetime trigger Sunday 11PM).
Similar problem to:
Is there a reliable way to check scoping so that i can do something like:
If scope == Gateway:
result = system.db.runNamedQuery('projectName','queryName',args)
else:
result = system.db.runNamedQuery('queryName',args)
A lot of my scripts written in my shared libraries are able to be run from either scope, this is the first time i've run into this problem.