Hi,
I need a trigger that blocks relationship establishments between items that belong to different projects :
When a user establish or edit a relationship, my trigger test if the source and the destination of that relationship belong to the same project. If not, it displays an error.
I made a pre-event trigger and it seems to work but :
1 - For the moment, the trigger runs each time an item is modified, even if the event doesn't concern a relationship. Is it possible to make the trigger running when the event is modification of any type of relationship without specifiying in the rules box which relationship I want the trigger runs on (so if I make a new type of relationship the trigger will also work on it without adding this relationship in the rules box) ?
2 - If I create a new item, associate it to a project, and establish a relationship with another one, when I press the save button, the trigger says that the new item isn't associated with any project (maybe because it is not in the database yet). What is the solution to this problem ?