Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
I have a scheduled script, and I've modified it to have an additional functionality to run as a rule. However, when I did run my rule trigger I received an error that the script may be run only from a scheduled trigger. I looked in the script and I couldn't find any sort of tag or check which specifically labels it as a scheduled trigger. How do I prevent this error and allow my script to run as a rule?
This is a similar scenario to the other question here.
Error while execution of a Rule based trigger
Thanks
Solved! Go to Solution.
Actually I found the line that was causing this. That's embarrassing, but I'll leave this here in case anyone else gets stuck on it. The line below ensures that a script will only run in a scheduled context.
if (eb.getEventContext() != "Schedule")
eb.badConfiguration(rb.handleGetObject("ONLY_SCHEDULED_TRIGGER"));
Actually I found the line that was causing this. That's embarrassing, but I'll leave this here in case anyone else gets stuck on it. The line below ensures that a script will only run in a scheduled context.
if (eb.getEventContext() != "Schedule")
eb.badConfiguration(rb.handleGetObject("ONLY_SCHEDULED_TRIGGER"));