Trigger for making in mandatory to add a project member to a new project

lock
push_pin
done
Besvart
3

I’m trying to create a trigger that checks that there is at least one project member linked to a project before the project can be saved, but I’m having trouble with this. Does anyone have any input? Grateful for any help. // Peter

20. aug. 2025 | 01:24 p.m.

Alle Svar (3)

Is it even possible in the UI to create a project with project members? Doesn't the project have to be saved first before you can add project members to it?

20. aug. 2025 | 01:31 p.m.
You’re probably right about what you’re saying. Do you know if it’s possible to write a trigger that checks whether there’s a project member linked to the project after it has been saved?
20. aug. 2025 | 02:25 p.m.

Hi Peter, it is possible to achieve what you want with two triggers:

  1. Trigger on before saving project: Look for number of project members, if 0 - open up a dialog box with a person list option. Set the selected person as a state value
  2. Trigger on after saving project: if you've provided a state value, add this person as a project member.

I created a prototype in my demo environment, and it works as you ask.

21. aug. 2025 | 06:43 a.m.

Hello Simen, sounds good!

Is there any possiblity for me to see what you have created?

21. aug. 2025 | 08:32 a.m.

Legg til svar