cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Error while execution of a Rule based trigger

spadaki
2-Guest

Error while execution of a Rule based trigger

Trigger file used: postLinkedIssue.js (present in the default script trigger directory of Integrity installation)

The error message: Exception thrown during script execution in post-event: The email.js script may only be run from a scheduled trigger

1 ACCEPTED SOLUTION

Accepted Solutions
LLawton
14-Alexandrite
(To:spadaki)

You should really try to give more details when posting questions about a specific error like this one, like trigger configurations and order.

From the script names you supplied, it looks like you have two different triggers and one may have caused the other one to run (postLinkedIssue causes email to run).

You have to start with the trigger that uses email.js and check its rule. From the error message, it seems you are using a post event but the script specifically says "This script is used to send mail notification from a scheduled trigger". So change that trigger to scheduled and see what happens.

View solution in original post

2 REPLIES 2
LLawton
14-Alexandrite
(To:spadaki)

You should really try to give more details when posting questions about a specific error like this one, like trigger configurations and order.

From the script names you supplied, it looks like you have two different triggers and one may have caused the other one to run (postLinkedIssue causes email to run).

You have to start with the trigger that uses email.js and check its rule. From the error message, it seems you are using a post event but the script specifically says "This script is used to send mail notification from a scheduled trigger". So change that trigger to scheduled and see what happens.

Hi Sujith,

As Laurent mentioned, some more details of what you're trying to do, and the trigger configuration would be useful.  It sounds like probably you want an email to be sent to someone, when the linked issue is created?

email.js is only for scheduled triggers.

Without knowing the background of what you're trying to do, I would comment, that there is also emailAdvanced.js, which as its name implies, handles more (it requires additional parameters and setup too), including being able to use that for both rule-based and schedule-based triggers.

Top Tags