Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
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
Solved! Go to Solution.
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.
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.