Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer 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"));